🇰🇷 한글 설명
GraphQL Mesh에서 루트 레벨 또는 단일 소스에 변환(transform)을 적용할 때, 클라이언트가 다른 변수를 사용하여 동일한 쿼리를 보내더라도 캐시가 만료되기 전까지 초기 변수가 계속 사용되는 취약점입니다. 이로 인해 토큰이 변수로 전달될 경우 이전 요청의 토큰이 다음 요청에도 유지되어 보안 문제가 발생할 수 있으며, LRU 메커니즘에 의해 캐시가 비워지기 전까지 메모리 누수가 발생할 수 있습니다.
💡 쉬운 설명
사용자가 요청을 보낼 때마다 정보를 바꿔서 보내도, 시스템이 예전 정보를 계속 기억하고 사용하여 다른 사람의 권한으로 동작할 수 있는 문제입니다. 또한, 예전 데이터가 메모리에 계속 남아 있어 시스템 성능에 영향을 줄 수 있습니다.
🇺🇸 원문 (English)
GraphQL Mesh is a GraphQL Federation framework and gateway for both GraphQL Federation and non-GraphQL Federation subgraphs, non-GraphQL services, such as REST and gRPC, and also databases such as MongoDB, MySQL, and PostgreSQL. When a user transforms on the root level or single source with transforms, and the client sends the same query with different variables, the initial variables are used in all following requests until the cache evicts DocumentNode. If a token is sent via variables, the following requests will act like the same token is sent even if the following requests have different tokens. This can cause a short memory leak but it won't grow per each request but per different operation until the cache evicts DocumentNode by LRU mechanism.
📍 영향받는 시스템
GraphQL Mesh (변환(transform) 기능을 사용하는 모든 버전)
⚔️ 공격 벡터
변수를 통해 인증 토큰을 전달하는 동일한 구조의 GraphQL 쿼리를 반복적으로 전송
🛡️ 대응 방법
GraphQL Mesh를 최신 보안 패치가 적용된 버전으로 업데이트하거나, 변환 로직에서 캐싱 전략을 재검토하십시오.
🔧 검증 코드
설치된 GraphQL Mesh의 버전을 확인하여 취약점이 해결된 최신 버전인지 확인합니다.
npm list @graphql-mesh/cli || yarn list @graphql-mesh/cli