🔍 CVE-2026-87803

7.1
CVSS Score
HIGH
2026-09-10
2026-09-10 15:53
✅ 완료

🇰🇷 한글 설명

Countly Server DBViewer의 집계 단계 검사기에서 서브 파이프라인을 잘못 감지하는 권한 우회 취약점이 존재합니다. 공격자는 알려지지 않은 스테이지 키를 사용하여 검사기를 우회하고 $lookup과 같은 금지된 연산자를 주입함으로써 제한된 컬렉션의 데이터에 접근할 수 있습니다. 이를 통해 비밀번호 재설정 토큰과 같은 민감한 정보가 유출되어 계정 탈취로 이어질 수 있습니다.

💡 쉬운 설명

데이터를 조회하는 과정에서 보안 검사기를 속여서 원래는 볼 수 없는 다른 데이터베이스의 정보를 몰래 훔쳐보는 취약점입니다. 이로 인해 관리자 권한이 없는 사용자도 다른 사용자의 비밀번호 관련 정보를 알아낼 수 있습니다.

🇺🇸 원문 (English)

An authorization bypass vulnerability exists in the Countly Server DBViewer due to flawed sub-pipeline detection in the aggregation stage sanitizer. The /o/db aggregation endpoint parses user-controlled aggregation JSON and passes it through a stage sanitizer that determines whether a nested array is a sub-pipeline by checking if every element contains a key present in a hardcoded KNOWN_STAGE_OPERATORS set. If any element contains an unrecognized stage key, such as the undocumented MongoDB-internal $_internalInhibitOptimization, the sanitizer misclassifies the entire branch as a generic array and skips stage-level stripping for all sibling stages. This allows a non-admin user with DBViewer read permission to inject forbidden operators like $lookup inside $facet sub-pipelines, performing cross-collection joins into restricted collections. This leads to unauthorized read access to sensitive data including password-reset tokens (prid), enabling account takeover.

📍 영향받는 시스템

Countly Server DBViewer (특정 버전 미표기, aggregation endpoint 사용 버전)

⚔️ 공격 벡터

사용자 제어 가능한 JSON 형태의 aggregation 쿼리에 특수 키($_internalInhibitOptimization 등)를 삽입하여 보안 검사기를 우회한 후 $lookup 연산자 주입

🛡️ 대응 방법

Countly Server를 최신 보안 패치가 적용된 버전으로 업데이트하고, DBViewer 권한에 대한 최소 권한 원칙을 적용하십시오.

🔧 검증 코드

명령어 실행 결과로 민감한 데이터 필드(prid 등)가 포함된 JSON 응답이 반환되면 취약한 상태입니다.

Shell / Script
curl -s -X POST http://<target>/o/db -d '{"aggregation": {"$facet": {"test": [{"$_internalInhibitOptimization": 1, "$lookup": {}}]}}}' | grep -E 'prid|password'

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N

💻 영향받는 소프트웨어

Spring Data MongoDB