🇰🇷 한글 설명
GraphQL-core의 파서가 주석을 건너뛰는 과정에서 주석 토큰을 메모리에 계속 유지하여 발생하는 메모리 고갈 취약점입니다. 공격자는 압축률이 높은 주석을 대량으로 포함한 GraphQL 문서를 전송하여 AST 기반의 보안 제어가 작동하기 전에 서버의 메모리를 소진시킬 수 있습니다.
💡 쉬운 설명
악의적인 사용자가 아주 긴 주석을 잔뜩 넣은 요청을 보내 서버의 메모리를 가득 채워 서비스를 마비시킬 수 있는 문제입니다. 보안 검사가 시작되기도 전에 서버의 자원을 먼저 낭비하게 만드는 공격 방식입니다.
🇺🇸 원문 (English)
GraphQL-core is a Python port of the GraphQL.js reference implementation. From 3.2.3 until 3.2.12 and 3.3.0rc1, the parser's max_tokens limit in Parser.advance_lexer counts only non-comment tokens returned after Lexer.lookahead skips comments. Each skipped comment is still allocated as a Token and retained through token.next and token.prev, allowing a highly compressible comment-padded GraphQL document to pass a low token limit while consuming memory. An unauthenticated remote attacker can exhaust worker memory before AST-based depth or complexity controls run. This issue is fixed in versions 3.2.12 and 3.3.0rc1.
📍 영향받는 시스템
GraphQL-core versions 3.2.3 to 3.2.12 and 3.3.0rc1
⚔️ 공격 벡터
인증되지 않은 원격 공격자가 대량의 주석이 포함된 GraphQL 문서를 전송하여 메모리 고갈 유도
🛡️ 대응 방법
GraphQL-core를 3.2.12 또는 3.3.0rc1 이상의 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 버전이 3.2.12 미만이거나 3.3.0rc1 미만인 경우 취약한 상태입니다.
pip show graphql-core | grep Version