mongodb: Reject "." and NUL bytes in database and collection names
Impact
Passing untrusted input as part of a database or collection name may result in targeting a different database or collection than specified.
Patches
Fixed in PHP library 1.21.4 and 2.4.1.
Workarounds
Validate database and collection names prior to passing into APIs.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Composer package | mongodb/mongodb | < 1.21.4, >= 2.0.0, < 2.4.1 | 1.21.4, 2.4.1 |
References
- https://github.com/mongodb/mongo-php-library/security/advisories/GHSA-65fr-j4p9-vc33
- https://nvd.nist.gov/vuln/detail/CVE-2026-81525
- https://github.com/mongodb/mongo-php-library/pull/1967
- https://github.com/mongodb/mongo-php-library/pull/1968
- https://github.com/mongodb/mongo-php-library/commit/3a462213bb4fd46efa58a1937b06b1b0553b67a7
- https://github.com/mongodb/mongo-php-library/commit/6f305a3b21740080255a3093b12458274c7cc8ca
- https://github.com/mongodb/mongo-php-driver/releases/tag/1.21.6
- https://github.com/mongodb/mongo-php-driver/releases/tag/1.21.7
- https://github.com/mongodb/mongo-php-driver/releases/tag/2.4.1
- https://github.com/mongodb/mongo-php-library
- https://github.com/mongodb/mongo-php-library/releases/tag/1.21.4
- https://github.com/mongodb/mongo-php-library/releases/tag/2.4.1
- https://jira.mongodb.org/browse/PHPLIB-1927
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N- Weakness (CWE)
CWE-943- Platform
- Composer
- Package
mongodb/mongodb- Disclosed
- 08.09.2026
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-65fr-j4p9-vc33 - CC BY 4.0
Vulnerability history: mongodb/mongodb
All published vulnerabilities of this package (Composer package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 3
- First → latest
- 08.2023 10.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- High 1
- Medium 2
Disclosures per year
- 2023: 1
- 2024: 0
- 2025: 0
- 2026: 2
-
mongodb: Reject "." and NUL bytes in database and collection names this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.