MongoDBDatabase / datastore

CVE-2026-1850

HIGH · 7.5 CVSS v3.1 Published 2026-02-10
Fix available
A fix is available. Upgrade to 8.0.18 / 8.2.4 or later.
See remediation →
84/100
Remediation priority · High
Remotely reachable No privileges 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
Complex queries can cause excessive memory usage in MongoDB Query Planner resulting in an Out-Of-Memory Crash.

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 · moderate confidence

This is a denial-of-service vulnerability in MongoDB's Query Planner where complex queries consume excessive memory, potentially leading to an Out-Of-Memory crash. The vulnerability is triggered by specially crafted complex queries that cause the query planner to allocate excessive memory during query planning phase.

MitigationImplement query complexity limits and timeouts at the application and database level. Monitor query patterns and optimize or block queries that exhibit excessive memory consumption characteristics. Apply vendor patches when available.

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:>= 8.0.0, < 8.0.18>= 8.2.0, < 8.2.4

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
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/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 to retrieve the exact version number
    Affected if The installed version falls within >= 8.0.0 and < 8.0.18, OR >= 8.2.0 and < 8.2.4
  2. Review query patterns for complexity
    Examine application queries, particularly those with multiple $or clauses, deep nested $and/$or structures, or large $in arrays. Use the MongoDB profiler (db.setProfilingLevel(2)) to capture slow queries and analyze their structure
    Affected if Complex queries with extensive boolean logic, large IN clauses, or deeply nested conditions are being executed against the database
  3. Monitor for memory pressure during query planning
    Check MongoDB logs for entries indicating excessive memory allocation during query planning, or monitor system memory usage during periods of complex query execution
    Affected if Logs show query planner memory allocation failures or the database experiences elevated memory consumption correlated with complex query operations
  4. Check for Out-Of-Memory events
    Review MongoDB log files (default location /var/log/mongodb/) for OOM crash indicators or restart events coinciding with complex query execution
    Affected if The database has experienced OOM crashes or unexpected restarts that cannot be attributed to other causes

Your environment is affected if you run MongoDB version 8.0.0-8.0.17 or 8.2.0-8.2.3 AND execute complex queries that cause the query planner to consume excessive memory.

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 8.0.18 / 8.2.4 or later
Fixed in 8.0.188.2.4
Interim mitigation

Implement query complexity limits and timeouts at the application and database level. Monitor query patterns and optimize or block queries that exhibit excessive memory consumption characteristics. Apply vendor patches when available.

Recommended fix High confidence

MongoDB 8.0.18 or 8.2.4 (depending on your current minor branch)

  1. Determine your current MongoDB version using: db.version()
  2. Plan maintenance window for upgrade (requires restart)
  3. Backup all databases before upgrading
  4. For MongoDB 8.0.x: Upgrade to version 8.0.18 or later
  5. For MongoDB 8.2.x: Upgrade to version 8.2.4 or later
  6. Follow official MongoDB upgrade instructions for your deployment type (standalone/replica set/sharded cluster)
  7. Restart MongoDB service after package installation
  8. Verify upgrade success by checking: db.version()
Caveat Minor version upgrades typically preserve data and configuration; review MongoDB 8.0.18 and 8.2.4 release notes for any behavior changes

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

Fix this in MongoDB Scoped from the published advisory
  • Consultation6.0 h
  • Implementation12.0 h
  • Testing6.0 h
  • Review / QA3.0 h
27.0 hours of engineering $4,800
Get the upgrade done

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

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2026-1850 — 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-1850 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