Skip to main content

MongoDB PHP Driver CVE-2026-81525

| EUVDEUVD-2026-67209 HIGH
Improper Neutralization of Special Elements in Data Query Logic (CWE-943)
2026-08-27 mongodb GHSA-65fr-j4p9-vc33
8.6
CVSS 4.0 · Vendor: mongodb
View

Attack ChainAIDerived

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

  1. Access
    Obtain application-level access
  2. Delivery
    Supply crafted string containing '.' or NUL byte
  3. Exploit
    Application passes input to PHP library namespace construction
  4. Execution
    Library fails to sanitize and constructs unintended namespace
  5. Persist
    MongoDB operation silently targets wrong collection
  6. Impact
    Read or write unauthorized collection data

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Query language parameterization
Exploitation Conditions

Exploitation requires that the target PHP application incorporates untrusted or user-supplied text directly into MongoDB database or collection name strings passed to the PHP library, without prior rejection of '.' or NUL byte characters. Applications that construct all namespace identifiers from trusted, hard-coded internal values are not vulnerable regardless of library version. The CVSS 4.0 PR:L metric indicates that some level of application access is required; unauthenticated exploitation against default configurations is not confirmed from available data. The flaw is strictly limited to namespace identifier handling and does not affect MongoDB query operator fields or document content, so collections accessed by fully static naming logic remain unaffected.

Impact

The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N) yields a score of 8.6, driven by network accessibility, low attack complexity, and high confidentiality and integrity impact against the vulnerable system. PR:L indicates exploitation is not unauthenticated - the attacker must have some application-level access to supply input that flows into namespace construction. No EPSS data was provided in the input intelligence, and the vulnerability is not present in the CISA KEV catalog. No proof-of-concept code has been identified. The practical risk is conditional: applications that construct namespace identifiers from trusted, hard-coded values are entirely unaffected, which substantially limits the real-world attack surface. For applications that do pass user-controlled strings into namespace construction, the impact is severe - silent misdirection of reads and writes across collection boundaries undermines data isolation assumptions without raising exceptions.

Exploit ScenarioDerived

An attacker with low-level access to a web application - such as an authenticated tenant user - submits a crafted record identifier or category name containing a '.' character into a field that the PHP application uses to construct a MongoDB collection name. The MongoDB PHP Library, without sanitization, incorporates the '.' into the namespace string and silently directs the query or write to an adjacent collection, potentially exposing documents belonging to other tenants or application modules. No public exploit code has been identified, but the attack requires only knowledge of the flaw and the ability to supply text to a namespace-consuming endpoint.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.3% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Aug 27, 2026

Namespace injection in the MongoDB PHP Library allows attackers with application-level access to silently redirect database operations to unintended collections or databases by supplying identifiers containing '.' or NUL byte characters. Applications using the MongoDB PHP Library before 2.4.1 or the MongoDB PHP Driver before 1.21.7 that incorporate untrusted text into namespace identifiers are affected, with high confidentiality and integrity risk confirmed by the CVSS 4.0 score of 8.6. No public exploit code has been identified at time of analysis, and the vulnerability is not listed in the CISA KEV catalog.

RemediationAI

Upgrade the MongoDB PHP Library to version 2.4.1 or later using Composer: 'composer require mongodb/mongodb:2.4.1', as confirmed by the vendor release at https://github.com/mongodb/mongo-php-library/releases/tag/2.4.1. Simultaneously upgrade the underlying MongoDB PHP Driver extension to version 1.21.7 or later, following installation instructions at https://php.net/manual/en/mongodb.installation.php, per the release at https://github.com/mongodb/mongo-php-driver/releases/tag/1.21.7. As a compensating control if patching cannot be applied immediately, validate all user-supplied strings at application input boundaries and reject or strip any '.' and NUL byte characters before they are passed to MongoDB namespace construction functions; note that application-level sanitization is brittle and should not be treated as a permanent substitute for the library fix, since future code paths may bypass it.

Affected VersionsENISA

PHP Driver 1.0.0 <2.4.1

Affected Packages

composer mongodb/mongodb fix: 1.21.4, 2.4.1
euvd php_driver fix: 2.4.1

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in composer, 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 Library and its underlying PHP Driver extension (CPE: cpe:2.3:a:mongodb:php_driver) construct MongoDB namespace identifiers in the format 'database.collection' when targeting storage operations. The library failed to reject '.' characters, which serve as the namespace delimiter in MongoDB, and NUL bytes, which may truncate strings at the C driver level. CWE-943 (Improper Neutralization of Special Elements in Data Query Logic) describes this class of flaw: by embedding a literal '.' into a user-supplied database or collection name, an attacker can traverse namespace boundaries and target an adjacent collection, while NUL byte injection can cause the driver to interpret a truncated string as the intended namespace. The fix, documented in PHPLIB-1927, explicitly validates and rejects these characters before namespace construction.

Know when MongoDB 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 8.6 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
vuln.today AI 8.1 HIGH

Network-reachable via application input with low complexity; PR:L because attacker must control input to namespace construction; scope unchanged as redirection stays within the same MongoDB instance with no availability impact.

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (mongodb).

CVSS VectorVendor: mongodb

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

Lifecycle Timeline

2
Patch available
Aug 27, 2026 - 22:03 EUVD
CVE Published
Aug 27, 2026 - 18:32 cve.org
HIGH 8.6

DescriptionCVE.org

The MongoDB client library for PHP does not sufficiently sanitize special elements in application-supplied namespace identifiers before using them to construct the target namespace for database operations. An application that incorporates untrusted text into these identifiers may have operations silently directed at a different storage location than the one the application intended.

Executive ViewAI

Why It Matters

Versions of MongoDB PHP Library (before 2.4.1) and MongoDB PHP Driver (before 1.21.7) contain a namespace injection vulnerability that allows attackers to redirect database queries to unintended data stores, creating direct threats to data confidentiality and integrity. Any application accepting user input for database or collection selection-whether through API parameters, URL paths, or form fields-is at risk if running affected versions. Leadership should prioritize assessment and immediate compensating controls given the 8.6 CVSS severity and current unavailability of vendor patches.

Business Impact: High
Compensating Controls

Implement strict input validation on all namespace parameters to reject any value containing '.' or NUL bytes; maintain a whitelist of approved database and collection names and enforce pattern matching before query execution; use parameterized query construction patterns where supported; audit codebase for all locations where user input flows into namespace identifiers; strengthen database-level access controls and role-based permissions to minimize blast radius; deploy database activity monitoring to detect and alert on unusual namespace access patterns.

Threat Intelligence Overview

EPSS Score
0.3%
Top 81% exploitable
Prevalence
Medium
widely used MongoDB client library in PHP web applications
Threat Intel
1
1 source
Social Media
1
Sightings
Data Quality
7 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 HIGH
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.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
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

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

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

NoSQL injection exploits databases that don't use traditional SQL syntax-like MongoDB, CouchDB, or Redis-by manipulating queries through unsanitized user input.

CVE-2013-1892 MEDIUM POC
6.0 Oct 01

MongoDB before 2.0.9 and 2.2.x before 2.2.4 does not properly validate requests to the nativeHelper function in SpiderMo

CVE-2013-3969 MEDIUM POC
6.5 Oct 01

The find prototype in scripting/engine_v8.h in MongoDB 2.4.0 through 2.4.4 allows remote authenticated users to cause a

CVE-2018-13863 HIGH POC
7.5 Jul 10

The MongoDB bson JavaScript module (also known as js-bson) versions 0.5.0 to 1.0.x before 1.0.5 is vulnerable to a Regul

CVE-2026-25887 HIGH POC
7.2 Mar 06

Remote code execution in Chartbrew versions prior to 4.8.1 allows authenticated attackers with high privileges to execut

CVE-2019-2386 HIGH POC
7.1 Aug 06

After user deletion in MongoDB Server the improper invalidation of authorization sessions allows an authenticated user's

CVE-2012-6619 MEDIUM POC
6.4 Mar 06

The default configuration for MongoDB before 2.3.2 does not validate objects, which allows remote authenticated users to

CVE-2026-3431 CRITICAL
9.8 Mar 02

SimStudio below 0.5.74 has a missing authorization on MongoDB tool endpoints that allows attackers to execute arbitrary

CVE-2024-8654 CRITICAL
9.8 Sep 10

MongoDB Server may access non-initialized region of memory leading to unexpected behaviour when zero arguments are calle

CVE-2024-6376 CRITICAL
9.8 Jul 01

MongoDB Compass may be susceptible to code injection due to insufficient sandbox protection settings with the usage of e

CVE-2024-1351 CRITICAL
9.8 Mar 07

Under certain configurations of --tlsCAFile and tls.CAFile, MongoDB Server may skip peer certificate validation which ma

CVE-2020-7610 CRITICAL
9.8 Mar 30

All versions of bson before 1.1.4 are vulnerable to Deserialization of Untrusted Data. Rated critical severity (CVSS 9.8

CVE-2026-19001 CRITICAL
9.5 Aug 12

Memory corruption in the MongoDB BI Connector ODBC Driver (fixed in v1.4.9) occurs when an oversized catalog, schema, or

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