CVE-2026-1850

6.5 MEDIUM

📋 TL;DR

This vulnerability allows attackers to crash MongoDB servers by sending complex queries that trigger excessive memory usage in the query planner. All MongoDB deployments using affected versions are vulnerable to denial-of-service attacks. The vulnerability requires query execution privileges to exploit.

💻 Affected Systems

Products:
  • MongoDB
Versions: Specific versions not provided in CVE description; check MongoDB advisory for affected ranges
Operating Systems: All platforms running MongoDB
Default Config Vulnerable: ⚠️ Yes
Notes: All MongoDB deployments with query execution capabilities are potentially affected regardless of configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete MongoDB service outage due to out-of-memory crashes, leading to application downtime and data unavailability.

🟠

Likely Case

Intermittent service disruptions and performance degradation as memory exhaustion causes query failures and restarts.

🟢

If Mitigated

Minimal impact with proper query validation, memory limits, and monitoring in place to detect abnormal query patterns.

🌐 Internet-Facing: MEDIUM - Requires authenticated query access but can be exploited remotely if MongoDB is exposed.
🏢 Internal Only: MEDIUM - Internal users with query privileges can cause service disruption.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Requires ability to execute complex queries against MongoDB; authenticated access needed but no special privileges beyond query execution.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Check MongoDB security advisory for specific fixed versions

Vendor Advisory: https://jira.mongodb.org/browse/SERVER-114126

Restart Required: Yes

Instructions:

1. Check MongoDB security advisory for affected versions. 2. Upgrade to patched version. 3. Restart MongoDB service. 4. Verify fix with test queries.

🔧 Temporary Workarounds

Implement Query Complexity Limits

all

Restrict maximum query complexity and execution time to prevent memory exhaustion

db.adminCommand({setParameter: 1, maxTimeMS: 10000})
Use MongoDB's $maxTimeMS operator in queries

Memory Usage Monitoring

all

Monitor MongoDB memory usage and implement alerts for abnormal patterns

mongostat --discover
Check MongoDB metrics for memory spikes

🧯 If You Can't Patch

  • Implement strict query validation and sanitization to reject overly complex queries
  • Deploy MongoDB behind application layer with query filtering and rate limiting

🔍 How to Verify

Check if Vulnerable:

Check MongoDB version against affected versions in security advisory; monitor for query planner memory spikes

Check Version:

mongod --version

Verify Fix Applied:

After patching, test with complex queries and monitor memory usage; verify no crashes occur

📡 Detection & Monitoring

Log Indicators:

  • Out of memory errors in MongoDB logs
  • Query planner memory allocation failures
  • MongoDB process crashes/restarts

Network Indicators:

  • Sudden increase in query complexity from single sources
  • Repeated complex query patterns

SIEM Query:

source="mongodb.log" AND ("out of memory" OR "OOM" OR "query planner" AND "memory")

🔗 References

📤 Share & Export