MongoDBDatabase / datastore

CVE-2026-8202

MEDIUM · 6.5 CVSS v3.1 Published 2026-05-13
Fix available
A fix is available. Upgrade to 7.0.34 / 8.0.23 or later.
See remediation →
71/100
Remediation priority · Elevated
Remotely reachable Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
Using a densely populated chars mask and a large input string in the MongoDB aggregation operators $trim, $ltrim, and $rtrim, an authenticated user with aggregation permissions can pin CPU utilization at 100% for an extended period of time. This issue impacts MongoDB Server v7.0 versions prior to 7.0.34, v8.0 versions prior to 8.0.23, v8.2 versions prior to 8.2.9 and v8.3 versions prior to 8.3.2.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

A denial-of-service vulnerability in MongoDB's aggregation operators $trim, $ltrim, and $rtrim allows an authenticated user with aggregation permissions to cause excessive CPU consumption by providing a densely populated character mask combined with a large input string, resulting in 100% CPU utilization for extended periods.

MitigationUpgrade MongoDB Server to v7.0.34, v8.0.23, v8.2.9, v8.3.2 or later to resolve this vulnerability.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
MongoDBDatabase / datastore
Affected:>= 7.0.0, < 7.0.34>= 8.0.0, < 8.0.23>= 8.2.0, < 8.2.9>= 8.3.0, < 8.3.2

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
Low
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

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

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify installed MongoDB version
    Run 'db.version()' in the mongo shell or use 'mongod --version' from command line
    Affected if The version falls within one of the affected ranges: >= 7.0.0 and < 7.0.34, >= 8.0.0 and < 8.0.23, >= 8.2.0 and < 8.2.9, or >= 8.3.0 and < 8.3.2
  2. Locally enumerate $trim-related aggregation usage
    Search application code and MongoDB logs for occurrences of $trim, $ltrim, or $rtrim in aggregation pipeline stages using grep or log analysis tools
    Affected if The aggregation operators $trim, $ltrim, or $rtrim are being used in any pipeline
  3. Audit user authentication and role assignments
    Run 'db.getUsers()' or 'db.getRoles()' to list authenticated users and their roles, focusing on those with aggregation permissions
    Affected if Any authenticated user has a role that includes aggregation privileges (such as 'readWrite' or custom roles with aggregate action)
  4. Review for long-running aggregation queries
    Inspect current operations with 'db.currentOp()' or check server logs for aggregation pipelines that run for extended periods with high CPU usage
    Affected if There are aggregation queries involving trim operators running for unusually long durations consuming high CPU

You are affected if your MongoDB version is within the vulnerable ranges AND you have authenticated users with aggregation permissions using $trim, $ltrim, or $rtrim operators on large input strings with densely populated character masks.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 7.0.34 / 8.0.23 / 8.2.9 or later
Fixed in 7.0.348.0.238.2.9
Interim mitigation

Upgrade MongoDB Server to v7.0.34, v8.0.23, v8.2.9, v8.3.2 or later to resolve this vulnerability.

Recommended fix High confidence

7.0.34, 8.0.23, 8.2.9, or 8.3.2 depending on your current major version branch

  1. 1. Identify current MongoDB version by running: db.version() or mongod --version
  2. 2. Determine target upgrade version based on current version: for 7.0.x upgrade to 7.0.34+, for 8.0.x upgrade to 8.0.23+, for 8.2.x upgrade to 8.2.9+, for 8.3.x upgrade to 8.3.2+
  3. 3. Create a full backup of all databases using mongodump
  4. 4. Stop the MongoDB instance or cluster
  5. 5. Upgrade MongoDB packages or binaries to the appropriate fixed version (e.g., apt-get install mongodb-org=8.0.23 or yum install mongodb-org-8.0.23)
  6. 6. Ensure package version pins to prevent automatic upgrades to unsupported major versions
  7. 7. Start the MongoDB instance and verify successful startup
  8. 8. Run db.adminCommand({getParameter: 1, version: 1}) to confirm new version
Caveat Minor version upgrades within same branch typically have no breaking changes; review MongoDB release notes for any deprecation notices

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in MongoDB Scoped from the published advisory
  • Consultation2.0 h
  • Implementation4.0 h
  • Testing2.0 h
  • Review / QA1.0 h
9.0 hours of engineering $1,600
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $2,560.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2026-8202 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2026-8202 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data