Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconAttacker crafts deeply-nested BSON document
-
DeliveryDelivers payload via HTTP POST, file upload, or API call
-
ExploitPHP application processes untrusted BSON input
-
InstallDriver parser recursively deserializes document structure
-
C2Stack frames accumulate without bounds
-
ExecuteStack overflow occurs
-
ImpactApplication process terminates with fatal error
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Recursion depth limits
|
| Exploitation Conditions | Vulnerability requires the application to process BSON documents from an untrusted source, NOT directly from a MongoDB Server instance. Standard MongoDB client operations (querying a trusted Server) are not affected because MongoDB Server imposes its own document depth limits. Exploitation requires the attacker to craft valid BSON binary format with deeply nested structures (>100+ levels typical); simple malformed input will be rejected by the parser before triggering recursion. The attack is not triggered by legitimate application usage or normal MongoDB communication patterns, limiting real-world exposure to applications that deliberately parse arbitrary BSON or accept BSON from external APIs. |
| Impact | CVSS 5.9 (Medium-High) with CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H indicates network-accessible denial of service with no confidentiality or integrity impact, but requiring high attack complexity to craft valid deeply-nested BSON structures. The AC:H factor reflects the difficulty of constructing BSON documents that trigger stack exhaustion-attackers must understand BSON format and calculate nesting depth precisely. No active exploitation reported in CISA KEV, and no public proof-of-concept identified at time of analysis. Real-world risk depends heavily on deployment context: applications that parse arbitrary BSON from user input or non-MongoDB sources face direct risk, while standard MongoDB client applications are partially protected by server-side validation. The high attack complexity and availability-only impact place this as a secondary priority compared to remote code execution vulnerabilities, but it warrants patching in applications handling untrusted BSON. |
| Exploit ScenarioDerived | An attacker crafts a BSON document with hundreds of nested sub-documents (e.g., {a:{b:{c:{...}}}}) totaling tens of kilobytes, then sends this payload to a PHP application that accepts BSON input via API endpoint or file upload. The PHP driver attempts to deserialize the document recursively, exhausting the process stack and triggering a fatal error, crashing the application instance and causing denial of service to legitimate users. If the application lacks error handling, this repeats for each request until the attacker stops. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 14, 2026
Stack exhaustion in MongoDB PHP driver allows remote denial of service when processing deeply nested BSON documents from untrusted sources. Unauthenticated attackers can crash applications by sending maliciously crafted BSON payloads with excessive nesting levels, affecting all versions of the PHP driver that parse BSON without depth limits. The vulnerability requires high attack complexity but results in complete availability loss.
RemediationAI
Upgrade MongoDB PHP driver to the patched version once released by MongoDB Inc.; check MongoDB JIRA ticket PHPC-2636 for patch availability and release notes. Until patching is possible, implement input validation to reject BSON documents exceeding a reasonable nesting depth (e.g., maximum 20 levels) before passing to the driver parser-this mitigates the attack vector from untrusted sources while preserving normal MongoDB communication. Additionally, configure PHP's max_execution_time and memory_limit conservatively to limit impact of any stack exhaustion event. If BSON processing is not a core requirement, disable BSON parsing features or restrict BSON input to MongoDB Server responses only, rejecting externally sourced BSON entirely.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The MongoDB PHP driver (mongodb/mongodb library) parses BSON (Binary JSON) documents, a binary serialization format used by MongoDB. The vulnerability exists in the BSON parser's recursive deserialization logic, which does not enforce reasonable depth limits when processing nested documents and arrays. CWE-674 (Uncontrolled Recursion) indicates the root cause: the parser follows object references recursively without safeguards, exhausting the PHP process stack when given adversarial input. This is particularly dangerous when the BSON source is not a trusted MongoDB Server instance but rather user-supplied data or data from untrusted APIs, removing the implicit validation that would normally occur in client-server communication.
Know when Php Driver 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
CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Primary rating from Vendor (mongodb) · only source for this CVE.
CVSS VectorVendor: mongodb
Lifecycle Timeline
2DescriptionCVE.org
Stack exhaustion vulnerability in the MongoDB PHP driver can cause application crashes when processing deeply nested BSON documents in unusual circumstances when the source of these BSON documents is not MongoDB Server.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
More in Php Driver
View allNamespace injection in the MongoDB PHP Library allows attackers with application-level access to silently redirect datab
An invalid memory release (CWE-763) in the MongoDB PHP Driver extension is triggered when string-typed options or type-m
A NoSQL query-expression injection in the query builder of the MongoDB integration for PHP web frameworks (tracked as PH
Stack exhaustion in the MongoDB PHP driver's BSON decoder allows unauthenticated attackers to terminate PHP processes th
Incorrect validation of files loaded from a local untrusted directory may allow local privilege escalation if the underl
An authorization bypass in the MongoDB Eloquent integration for Laravel lets a user holding only basic application privi
Missing authorization in the Laravel MongoDB query builder allows an authenticated user with basic application privilege
Laravel MongoDB applications that protect sensitive model fields with deny-lists can have those protections bypassed by
Incorrect authorization in Laravel MongoDB's embedded relation handling allows an authenticated low-privilege user to mo
Out-of-bounds read in the BSON decoding component of the MongoDB PHP Driver (all versions per CPE cpe:2.3:a:mongodb:php_
A mongoc_bulk_operation_t may read invalid memory if large options are passed. Rated medium severity (CVSS 6.9), this vu
The MongoDB PHP extension (php_driver) renders the entire connection string - including embedded username and password c
EUVD-2026-30490
GHSA-vc69-vr6f-4x67
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB