🇰🇷 한글 설명
Apollo Router의 분산 쿼리 계획 캐싱 버그로 인해 캐시된 잘못된 쿼리가 실행되어 예상과 다른 데이터 조회 또는 잘못된 뮤테이션이 수행될 수 있습니다. Redis 캐시에서 이전 작업의 수정된 버전이 실행되는 문제입니다.
💡 쉬운 설명
Apollo Router의 캐시 시스템이 잘못된 쿼리를 저장하고 재사용하여 의도하지 않은 데이터 조회나 삭제가 발생할 수 있습니다. 예를 들어 A 사용자 조회를 요청했지만 B 사용자 데이터가 반환되거나 잘못된 사용자가 삭제될 수 있습니다.
🇺🇸 원문 (English)
Apollo Router is a configurable, graph router written in Rust to run a federated supergraph that uses Apollo Federation 2. The affected versions of Apollo Router contain a bug that in limited circumstances, could lead to unexpected operations being executed which can result in unintended data or effects. This only affects Router instances configured to use distributed query plan caching. The root cause of this defect is a bug in Apollo Router’s cache retrieval logic: When this defect is present and distributed query planning caching is enabled, asking the Router to execute an operation (whether it is a query, a mutation, or a subscription) may result in an unexpected variation of that operation being executed or the generation of unexpected errors. The issue stems from inadvertently executing a modified version of a previously executed operation, whose query plan is stored in the underlying cache (specifically, Redis). Depending on the type of the operation, the result may vary. For a query, results may be fetched that don’t match what was requested (e.g., rather than running `fetchUsers(type: ENTERPRISE)` the Router may run `fetchUsers(type: TRIAL)`. For a mutation, this may result in incorrect mutations being sent to underlying subgraph servers (e.g., rather than sending `deleteUser(id: 10)` to a subgraph, the Router may run `deleteUser(id: 12)`. Users who are using distributed query plan caching, are advised to either upgrade to version 1.45.1 or above or downgrade to version 1.43.2 of the Apollo Router. Apollo Router versions 1.44.0 or 1.45.0 are not recommended for use and have been withdrawn. Users unable to upgrade can disable distributed query plan caching to mitigate this issue.
📍 영향받는 시스템
Apollo Router 1.44.0, 1.45.0 (분산 쿼리 계획 캐싱 활성화된 인스턴스)
⚔️ 공격 벡터
분산 쿼리 계획 캐싱이 활성화된 Apollo Router 인스턴스에 대해 동일한 작업을 반복 실행하면 캐시된 수정된 쿼리 플랜이 실행되어 unintended operations 발생
🛡️ 대응 방법
1.45.1 이상으로 업그레이드하거나 1.43.2로 다운그레이드하거나 분산 쿼리 계획 캐싱을 비활성화
🔧 검증 코드
1.44.0, 1.45.0, 1.43.0-1.43.1이 출력되면 취약 버전입니다. 1.45.1 이상 또는 1.43.2 이상이 출력되면 안전합니다.
apollo-router --version 2>/dev/null | grep -oE '1\.(4[45]\.[0-9]+|43\.[0-3])'