An authorization bypass vulnerability exists in the Countly Server DBViewer due to flawed sub-pipeline detection in the aggregation stage sanitizer. (CVE-2026-87803)
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.
AI Analysis
Technical Summary
The vulnerability exists because the aggregation stage sanitizer misclassifies nested arrays when encountering unrecognized stage keys (e.g., the undocumented MongoDB-internal $_internalInhibitOptimization). This causes the sanitizer to skip stage-level stripping for sibling stages, allowing injection of forbidden operators like $lookup within $facet sub-pipelines. Consequently, a non-admin user with DBViewer read permission can perform unauthorized cross-collection joins, accessing restricted collections and sensitive data such as password-reset tokens (prid), which can lead to account takeover.
Potential Impact
The flaw enables unauthorized read access to sensitive data by bypassing intended authorization controls. Specifically, it allows non-admin users with DBViewer read permission to perform cross-collection joins into restricted collections, exposing sensitive information including password-reset tokens. This can facilitate account takeover attacks. The vulnerability does not impact system integrity or availability but has a high confidentiality impact.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, restrict DBViewer read permissions to trusted users only and monitor for suspicious use of aggregation queries. Avoid exposing the vulnerable aggregation endpoint to untrusted users.
An authorization bypass vulnerability exists in the Countly Server DBViewer due to flawed sub-pipeline detection in the aggregation stage sanitizer. (CVE-2026-87803)
Description
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.
CVSS v3.1
Score 7.1high
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability exists because the aggregation stage sanitizer misclassifies nested arrays when encountering unrecognized stage keys (e.g., the undocumented MongoDB-internal $_internalInhibitOptimization). This causes the sanitizer to skip stage-level stripping for sibling stages, allowing injection of forbidden operators like $lookup within $facet sub-pipelines. Consequently, a non-admin user with DBViewer read permission can perform unauthorized cross-collection joins, accessing restricted collections and sensitive data such as password-reset tokens (prid), which can lead to account takeover.
Potential Impact
The flaw enables unauthorized read access to sensitive data by bypassing intended authorization controls. Specifically, it allows non-admin users with DBViewer read permission to perform cross-collection joins into restricted collections, exposing sensitive information including password-reset tokens. This can facilitate account takeover attacks. The vulnerability does not impact system integrity or availability but has a high confidentiality impact.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, restrict DBViewer read permissions to trusted users only and monitor for suspicious use of aggregation queries. Avoid exposing the vulnerable aggregation endpoint to untrusted users.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-3m7r-f729-ggmf
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-87803"]
- Ecosystems
- []
- Database Specific Severity
- HIGH
- Cvss Version
- 3.1
Threat ID: 6aa2af4bacd9273b49259f96
Added to database: 09/10/2026, 13:23:23 UTC
Last enriched: 09/10/2026, 13:24:57 UTC
Last updated: 09/10/2026, 16:41:12 UTC
Views: 5
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.