Skip to main content

Countly Server CVE-2026-87803

| EUVDEUVD-2026-75367 HIGH
Incorrect Authorization (CWE-863)
2026-09-10 snyk GHSA-3m7r-f729-ggmf
7.1
CVSS 4.0 · Vendor: snyk
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Authenticate as low-privilege DBViewer user
  2. Delivery
    Craft aggregation with $_internalInhibitOptimization bypass key
  3. Exploit
    Sanitizer misclassifies $facet sub-array as generic
  4. Install
    Inject $lookup stage into unrestricted sub-pipeline
  5. C2
    Perform cross-collection join into restricted collection
  6. Execute
    Extract prid password-reset tokens
  7. Impact
    Execute account takeover

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V8 - Authorization Authorization logic validation
MITRE ATT&CK

1 technique across 1 tactic: Privilege Escalation

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires an authenticated Countly Server account that has been explicitly granted DBViewer read permission - this is a non-default, operator-assigned privilege. The attacker must target a Countly Server deployment where the DBViewer plugin is installed and enabled (it ships with the server but must be activated). The bypass requires knowledge of the undocumented MongoDB-internal stage operator $_internalInhibitOptimization; without this specific key (or another key absent from the hardcoded KNOWN_STAGE_OPERATORS set), the sanitizer behaves correctly. No user interaction from a victim is required after the attacker sends the crafted request. Deployments where DBViewer access is restricted to global admins only are not exploitable - the attack collapses when the attacker's privilege level already grants access to the targeted collections.

Impact

The CVSS 3.1 vector AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N scores 7.1 (High), which accurately reflects the threat: network-accessible, low-friction exploitation by any user holding a DBViewer read credential, with high confidentiality impact from unrestricted cross-collection reads. The I:L score is justified by the downstream account-takeover potential through stolen password-reset tokens rather than direct write operations. No KEV listing has been identified, and no public exploit code is confirmed, but the published PR diff lowers the barrier to exploitation significantly - the bypass technique is essentially documented in the patch. EPSS data is not provided; given the specificity of the required knowledge (undocumented MongoDB internal operator name), opportunistic mass exploitation is unlikely, but a determined internal attacker or one with prior Countly knowledge could weaponize this readily. The 'Authentication Bypass' tag in the input metadata is inaccurate - the attacker IS authenticated (PR:L); the flaw bypasses *authorization*, not authentication. Real-world risk is moderate-to-high for organizations where untrusted users hold DBViewer read access; in deployments where DBViewer is restricted to admins only, the attack surface collapses entirely.

Exploit ScenarioDerived

An attacker holding a Countly account with DBViewer read permission sends a crafted POST to /o/db containing a MongoDB aggregation pipeline where a $facet stage embeds a sub-array that includes an element keyed $_internalInhibitOptimization; the sanitizer misidentifies the sub-array as a non-pipeline generic value and skips enforcement, allowing a sibling $lookup to join into the members collection. The attacker extracts prid (password-reset token) fields for target accounts and uses them to trigger password resets and complete account takeover without any further interaction. The PR diff at GitHub provides sufficient technical detail to reconstruct this attack, but no standalone proof-of-concept has been confirmed publicly.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
No patch listed yet 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 10, 2026

Authorization bypass in Countly Server's DBViewer plugin allows authenticated low-privilege users to read data from restricted MongoDB collections, including plaintext password-reset tokens, by exploiting a logic flaw in the aggregation-pipeline sanitizer. The /o/db aggregation endpoint's stage sanitizer misclassifies branches containing unrecognized MongoDB-internal operators (such as $_internalInhibitOptimization) as generic arrays rather than sub-pipelines, causing it to skip enforcement entirely for that branch. This lets a user holding only DBViewer read permission inject $lookup stages inside $facet sub-pipelines, cross-join into restricted collections such as members, and extract sensitive fields including prid (password-reset tokens), which are directly usable for account takeover. No public exploit has been identified at time of analysis, but the GitHub PR diff exposes sufficient technical detail to reconstruct the technique.

RemediationAI

Apply the fix from GitHub PR #7868 (https://github.com/Countly/countly-server/pull/7868) by merging or cherry-picking into the deployed Countly Server instance; a formally tagged release version incorporating this change has not been independently confirmed, so administrators should verify patch inclusion in the next tagged release. The fix replaces the flawed strip-on-violation sanitizer with a reject-on-violation model: any disallowed operator at any nesting depth now rejects the entire request with HTTP 400, eliminating the bypass condition. As a compensating control until the patch is applied, remove DBViewer read permissions from all non-global-admin accounts - DBViewer access is non-default and should be scoped to administrators only. Additionally, network-level controls restricting access to the /o/db endpoint (e.g., via reverse proxy ACLs) reduce exposure if DBViewer cannot be disabled outright. Disabling the DBViewer plugin entirely is the most effective temporary mitigation if the feature is not operationally required.

Affected VersionsENISA

countly-server 0 <*

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Countly Server is a self-hosted analytics platform; its DBViewer plugin exposes a /o/db HTTP endpoint that allows authenticated users to run MongoDB aggregation pipelines against application collections. The sanitizer in plugins/dbviewer/api/parts/aggregation_guard.js enforces an allowlist by inspecting each element of a nested array and checking whether its key exists in a hardcoded KNOWN_STAGE_OPERATORS set to determine if the array is a sub-pipeline. The flaw (CWE-863 - Incorrect Authorization) is in this heuristic: encountering any element whose key is absent from the set (e.g., the undocumented MongoDB-internal $_internalInhibitOptimization stage) causes the sanitizer to treat the entire containing array as a non-pipeline generic value and bypass stage-level stripping for all sibling stages within it. The fix, visible in PR #7868, replaces the strip-on-violation approach with a reject-on-violation approach - any disallowed operator at any depth now returns an HTTP 400 - eliminating the bypass condition entirely. The CPE cpe:2.3:a:countly:countly-server:*:*:*:*:*:*:*:* indicates all released versions are affected.

Know when Countly Server gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (snyk) PRIMARY 7.1 HIGH
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
vuln.today AI 7.1 HIGH

Network endpoint requires low-privilege DBViewer credentials; high confidentiality from unrestricted collection reads; low integrity from indirect account takeover via stolen reset tokens.

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (snyk).

CVSS VectorVendor: snyk

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
Low
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

Countly Server's DBViewer plugin contains an authorization bypass flaw that allows low-privilege authenticated users to extract plaintext password-reset tokens from restricted MongoDB collections, enabling account takeover of higher-privilege accounts including administrators. This threatens the integrity of user authentication systems and exposes organizations using Countly to credential-based compromise without requiring administrative access.

Business Impact: High
Compensating Controls

Restrict DBViewer plugin access to administrative users only and disable the plugin if operationally unnecessary; implement MongoDB collection-level access controls to prevent aggregation pipeline queries against the members collection from non-admin contexts; enable and monitor MongoDB audit logs for anomalous pipeline queries; implement rate limiting on the /o/db aggregation endpoint to detect brute-force attempts; rotate all password-reset tokens immediately and enforce re-authentication for sensitive operations.

Threat Intelligence Overview

EPSS Score
0.3%
Top 77% exploitable
Prevalence
Low
self-hosted analytics platform, niche enterprise/developer footprint
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.3%
Patch available No
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Partial

Priority Score

36
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +36
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy