mongodb/mongo-php-library · Security
mongodb: Reject "." and NUL bytes in database and collection names
- GHSA ID
- GHSA-65fr-j4p9-vc33
- CVE ID
- CVE-2026-81525
- Severity
- high
- Published
- Updated
- CVSS
- 8.1 · CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
- CVSS v3
- 8.1 · CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
- CVSS v4
- 8.6 · 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
Description
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.
CWEs
- CWE-943 · Improper Neutralization of Special Elements in Data Query Logic
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/releases/tag/1.21.4 ↗
- https://github.com/mongodb/mongo-php-library/releases/tag/2.4.1 ↗
- https://jira.mongodb.org/browse/PHPLIB-1927 ↗
- https://github.com/advisories/GHSA-65fr-j4p9-vc33 ↗