🇰🇷 한글 설명
github.com/graphql-go/graphql 0.8.1 이하 버전에서 스칼라 변수 값이 선언된 타입과 일치하는지 검증하지 않는 취약점이 발견되었습니다. 이로 인해 특정 상황에서 깊게 중첩된 값이 입력될 경우 스택 오버플로(stack overflow)가 발생하여 서비스가 중단될 수 있습니다.
💡 쉬운 설명
데이터 형식을 확인하는 과정에서 실수가 있어, 잘못된 형식의 데이터를 대량으로 보내면 프로그램이 감당하지 못하고 멈춰버릴 수 있는 문제입니다. 이는 서비스가 갑자기 꺼지는 원인이 될 수 있습니다.
🇺🇸 원문 (English)
github.com/graphql-go/graphql (GraphQL for Go) through 0.8.1 does not validate that a scalar variable value matches its declared type. The built-in coerceString and coerceBool functions (scalars.go) accept input whose type does not match the declared String, ID, or Boolean scalar instead of raising the request error that the GraphQL specification mandates. In some cases (but not any typical case of JSON sent to a website), a deeply nested value leads to an unrecoverable "fatal error: stack overflow" condition.
📍 영향받는 시스템
github.com/graphql-go/graphql 0.8.1 이하 버전
⚔️ 공격 벡터
GraphQL 요청 시 선언된 타입과 일치하지 않는 깊게 중첩된 스칼라 값을 전송하여 스택 오버플로 유도
🛡️ 대응 방법
graphql-go/graphql 라이브러리를 최신 버전으로 업데이트하여 타입 검증 로직을 적용하십시오.
🔧 검증 코드
출력된 결과의 버전이 0.8.1 이하인지 확인하여 취약 여부를 판단합니다.
go list -m github.com/graphql-go/graphql