🇰🇷 한글 설명
Strawberry GraphQL 라이브러리의 레거시 graphql-ws 구독 핸들러에서 완료된 작업을 제대로 제거하지 않는 결함이 발견되었습니다. 이로 인해 설정된 최대 구독 제한에 도달하면 이후의 정상적인 구독 요청이 거부될 수 있습니다.
💡 쉬운 설명
한 번 쓰고 끝나는 작업이 완료되어도 시스템이 이를 계속 사용 중인 것으로 착각하여 자원을 계속 점유합니다. 이로 인해 새로운 연결 요청이 들어와도 자리가 없다는 이유로 거절될 수 있습니다.
🇺🇸 원문 (English)
Strawberry GraphQL is a library for creating GraphQL APIs. From 0.312.3 until 0.327.2, the legacy graphql-ws subscription handler in strawberry/subscriptions/protocols/graphql_ws/handlers.py does not remove naturally completed operations from self.tasks and self.subscriptions. When max_subscriptions_per_connection is configured, a client on a persistent WebSocket connection can use distinct operation IDs for one-shot subscriptions to fill the connection's configured slots even after those subscriptions send complete, causing later legitimate operations on that connection to be rejected with Subscription limit reached. The modern graphql-transport-ws protocol and deployments without the configured per-connection cap are not affected. This issue is fixed in version 0.327.2.
📍 영향받는 시스템
Strawberry GraphQL 0.312.3 ~ 0.327.2 버전
⚔️ 공격 벡터
지속적인 WebSocket 연결을 통해 완료된 구독 작업을 반복적으로 생성하여 연결당 구독 슬롯을 모두 점유함
🛡️ 대응 방법
Strawberry GraphQL을 0.327.2 이상의 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 버전이 0.312.3보다 크고 0.327.2보다 작거나 같다면 취약한 버전입니다.
pip show strawberry-graphql | grep Version