🇰🇷 한글 설명
ash-project의 ash_graphql 라이브러리에서 발생하는 권한 부여 오류로, 구독자가 접근 권한이 없는 레코드의 GraphQL 구독 페이로드가 노출될 수 있습니다. 배치 처리 과정에서 첫 번째 알림에만 권한 필터링이 적용되고 나머지 알림에는 적용되지 않아 발생하는 문제입니다.
💡 쉬운 설명
데이터를 묶어서 보내는 과정에서 보안 검사를 첫 번째 데이터에만 하고 나머지는 건너뛰는 실수가 있었습니다. 이로 인해 권한이 없는 사용자가 남의 정보를 몰래 볼 수 있는 위험이 있습니다.
🇺🇸 원문 (English)
Incorrect Authorization vulnerability in ash-project ash_graphql delivers GraphQL subscription payloads for records a subscriber is not authorized to see.
In AshGraphql.Subscription.Batcher, do_send/5 resolves the first notification of a batch and filters it with should_send?/1, which drops results whose errors are coded forbidden or not_found or carry no code, precisely so that unauthorized results are not disclosed. The remaining notifications in the batch are read from the process dictionary, re-run through the pipeline, and appended to the outgoing results without that filter. They reach pubsub.publish_subscription/2, and the not is_nil(record) guard drops only nil records, not error-carrying results. Any two qualifying notifications arriving within the default one-second batch interval suffice, and batching is the default path. The fix applies should_send?/1 to the whole batch.
This issue affects ash_graphql: from 1.4.0 before 1.11.0.
📍 영향받는 시스템
ash_graphql: 1.4.0 미만 1.11.0 버전
⚔️ 공격 벡터
GraphQL 구독(Subscription) 기능을 통해 권한이 없는 데이터가 포함된 배치 알림을 수신함
🛡️ 대응 방법
ash_graphql 라이브러리를 1.11.0 이상의 최신 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 버전이 1.11.0 미만(예: 1.4.0 ~ 1.10.x)이면 취약한 상태입니다.
mix deps info ash_graphql | grep -E 'ash_graphql \([0-9]+\.[0-9]+\.[0-9]+\)'