CVE-2026-81525: mongodb Reject "." And NUL Bytes Vulnerability
HIGHCVE-2026-81525 is a HIGH (CVSS 8.1) reject "." and nul bytes vulnerability (CWE-943: Improper Neutralization of Special Elements in Data Query Logic) affecting mongodb libraries in the Packagist ecosystem. The issue involves reject "." and nul bytes in database and collection names. Remediation is available by upgrading affected packages to version 1.21.4, 2.4.1.
CVE-2026-81525 at a Glance
Security Impact
CVSS: 8.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N).
How to Fix CVE-2026-81525
To remediate this vulnerability, upgrade all affected mongodb dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade mongodb/mongodb to 1.21.4
Upgrade mongodb/mongodb to 2.4.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for mongodb/mongodb
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-81525, inspect your project dependencies for mongodb:
inspect dependencies for mongodb/mongodb
Analyze the terminal output to locate any version of mongodb in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.21.4), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-943: Improper Neutralization of Special Elements in Data Query Logic, where the product generates a query intended to access or manipulate data in a data store such as a database, but it does not neutralize or incorrectly neutralizes special elements that can modify the intended logic of the query. In mongodb, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-81525 Affected mongodb Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
mongodb/mongodb
|
Packagist |
< 1.21.4
|
1.21.4
|
|
mongodb/mongodb
|
Packagist |
≥ 2.0.0
< 2.4.1
|
2.4.1
|
References
Frequently Asked Questions
What is CVE-2026-81525?
Which mongodb versions are affected?
What version fixes CVE-2026-81525?
Is mongodb/mongodb affected?
What is the CVSS score of CVE-2026-81525?
What CWE is associated with CVE-2026-81525?
How can I check Packagist dependencies for CVE-2026-81525?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-65fr-j4p9-vc33",
"modified" : "2026-09-08T21:27:42Z",
"published" : "2026-09-08T21:27:42Z",
"aliases" : [ "CVE-2026-81525" ],
"summary" : "mongodb: Reject \".\" and NUL bytes in database and collection names",
"details" : "### Impact\nPassing untrusted input as part of a database or collection name may result in targeting a different database or collection than specified.\n\n### Patches\nFixed in PHP library 1.21.4 and 2.4.1.\n\n### Workarounds\nValidate database and collection names prior to passing into APIs.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N"
}, {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "mongodb/mongodb"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.21.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "mongodb/mongodb"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.4.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/mongodb/mongo-php-library/security/advisories/GHSA-65fr-j4p9-vc33"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-81525"
}, {
"type" : "WEB",
"url" : "https://github.com/mongodb/mongo-php-library/pull/1967"
}, {
"type" : "WEB",
"url" : "https://github.com/mongodb/mongo-php-library/pull/1968"
}, {
"type" : "WEB",
"url" : "https://github.com/mongodb/mongo-php-library/commit/3a462213bb4fd46efa58a1937b06b1b0553b67a7"
}, {
"type" : "WEB",
"url" : "https://github.com/mongodb/mongo-php-library/commit/6f305a3b21740080255a3093b12458274c7cc8ca"
}, {
"type" : "WEB",
"url" : "https://github.com/mongodb/mongo-php-driver/releases/tag/1.21.6"
}, {
"type" : "WEB",
"url" : "https://github.com/mongodb/mongo-php-driver/releases/tag/1.21.7"
}, {
"type" : "WEB",
"url" : "https://github.com/mongodb/mongo-php-driver/releases/tag/2.4.1"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/mongodb/mongo-php-library"
}, {
"type" : "WEB",
"url" : "https://github.com/mongodb/mongo-php-library/releases/tag/1.21.4"
}, {
"type" : "WEB",
"url" : "https://github.com/mongodb/mongo-php-library/releases/tag/2.4.1"
}, {
"type" : "WEB",
"url" : "https://jira.mongodb.org/browse/PHPLIB-1927"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-943" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-09-08T21:27:42Z",
"nvd_published_at" : "2026-08-27T20:18:50Z"
}
}