Skip to main content

MongoDB PHP Driver CVE-2026-6811

| EUVDEUVD-2026-30490 MEDIUM
Uncontrolled Recursion (CWE-674)
2026-05-14 mongodb GHSA-vc69-vr6f-4x67
6.0
CVSS 4.0 · Vendor: mongodb
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Attacker crafts deeply-nested BSON document
  2. Delivery
    Delivers payload via HTTP POST, file upload, or API call
  3. Exploit
    PHP application processes untrusted BSON input
  4. Install
    Driver parser recursively deserializes document structure
  5. C2
    Stack frames accumulate without bounds
  6. Execute
    Stack overflow occurs
  7. Impact
    Application 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
No patch listed yet 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

PHP Driver 2.1.8
PHP Driver 1.21.5

Affected Packages

euvd php_driver no fix

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

Vendor (mongodb) PRIMARY 6.0 MEDIUM
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

Attack Vector
Network
Attack Complexity
High
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
CVSS changed
May 14, 2026 - 22:22 NVD
5.9 (MEDIUM) 6.0 (MEDIUM)
CVE Published
May 14, 2026 - 21:27 nvd
MEDIUM 5.9

DescriptionCVE.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

EPSS Score
0.0%
Top 88% exploitable
Social Media
1
Sightings
Data Quality
6 sources
Confidence: High

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available No
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

CVE-2026-81525 HIGH
8.6 Aug 27

Namespace injection in the MongoDB PHP Library allows attackers with application-level access to silently redirect datab

CVE-2026-135133 HIGH
8.5 Nov 25

An invalid memory release (CWE-763) in the MongoDB PHP Driver extension is triggered when string-typed options or type-m

CVE-2026-135147 HIGH
8.3 Nov 25

A NoSQL query-expression injection in the query builder of the MongoDB integration for PHP web frameworks (tracked as PH

CVE-2026-112368 HIGH
8.2 Oct 19

Stack exhaustion in the MongoDB PHP driver's BSON decoder allows unauthenticated attackers to terminate PHP processes th

CVE-2024-7553 HIGH
7.8 Aug 07

Incorrect validation of files loaded from a local untrusted directory may allow local privilege escalation if the underl

CVE-2026-135145 HIGH
7.6 Nov 25

An authorization bypass in the MongoDB Eloquent integration for Laravel lets a user holding only basic application privi

CVE-2026-135144 HIGH
7.6 Nov 25

Missing authorization in the Laravel MongoDB query builder allows an authenticated user with basic application privilege

CVE-2026-135228 HIGH
7.1 Nov 25

Laravel MongoDB applications that protect sensitive model fields with deny-lists can have those protections bypassed by

CVE-2026-135142 HIGH
7.1 Nov 25

Incorrect authorization in Laravel MongoDB's embedded relation handling allows an authenticated low-privilege user to mo

CVE-2026-84968 MEDIUM
6.9 Sep 03

Out-of-bounds read in the BSON decoding component of the MongoDB PHP Driver (all versions per CPE cpe:2.3:a:mongodb:php_

CVE-2025-12119 MEDIUM
6.9 Nov 18

A mongoc_bulk_operation_t may read invalid memory if large options are passed. Rated medium severity (CVSS 6.9), this vu

CVE-2026-129928 MEDIUM
6.8 Nov 19

The MongoDB PHP extension (php_driver) renders the entire connection string - including embedded username and password c

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy