CVE-2026-87803
nicheAuthorization Bypass in Countly Server DBViewer Enables Account Takeover
Countly Server's DBViewer component contains an authorization bypass caused by flawed sub-pipeline detection in its aggregation stage sanitizer. When a non-admin user with DBViewer read permission submits an aggregation to the /o/db endpoint containing an unrecognized stage key (such as the MongoDB-internal $_internalInhibitOptimization) inside a nested array, the sanitizer misclassifies the branch as a generic array and skips stage stripping for sibling stages. This lets the attacker inject normally forbidden operators like $lookup inside $facet sub-pipelines, performing cross-collection joins into collections they are not authorized to read. The attacker gains unauthorized read access to sensitive data, including password-reset tokens (prid), which can be leveraged for account takeover. The flaw is not yet listed in CISA KEV, no public proof-of-concept is known, and no in-the-wild exploitation has been reported.
What to do: Update Countly Server to a patched release as specified in the vendor/Snyk advisory, and as an interim mitigation restrict DBViewer access to admins only or disable non-admin access to the /o/db aggregation endpoint. Check logs for non-admin aggregation requests containing $lookup inside $facet or the $_internalInhibitOptimization operator, and rotate password-reset tokens (prid) for users in DBViewer-enabled deployments if such queries are found.
| Countly Server (DBViewer component, /o/db aggregation endpoint) | — |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
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.
- Weakness
- CWE-863
- Vector
- CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
In the news0 stories
No ingested article mentions this CVE yet.