{"id":"CVE-2026-81525","aliases":["CVE-2026-81525","GHSA-65fr-j4p9-vc33"],"related":[],"kind":"vulnerability","state":"published","title":"Cross-tenant database retargeting via dot/NUL injection in namespace strings in the PHP Driver","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### 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.","format":"markdown","source":"ghsa"}],"published":"2026-08-27T18:32:26.493Z","modified":"2026-09-29T19:17:04.850Z","severity":{"scorer":"mongodb","scheme":"CVSS:4.0","vector":"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","score":8.6,"rating":"HIGH"},"severities":[{"scorer":"mongodb","scheme":"CVSS:4.0","vector":"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","score":8.6,"rating":"HIGH"},{"scorer":"mongodb","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N","score":8.1,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N","score":8.1,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"HIGH"}],"cwes":["CWE-943"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"1.21.4","status":"affected"},{"type":"semver","introduced":"2.0.0","fixed":"2.4.1","status":"affected"}],"vendor":"MongoDB","product":"PHP Library","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","fixed":"1.21.6","status":"affected"},{"type":"semver","introduced":"2.0.0","fixed":"2.4.1","status":"affected"}],"vendor":"MongoDB","product":"PHP Extension","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.21.4"}],"ecosystem":"Packagist","package":"mongodb/mongodb","purl":"pkg:composer/mongodb/mongodb","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.0.0","status":"affected","fixed":"2.4.1"}],"ecosystem":"Packagist","package":"mongodb/mongodb","purl":"pkg:composer/mongodb/mongodb","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"1.21.6"},{"status":"affected","introduced":"2.0.0","fixed":"2.4.1"}],"vendor":"mongodb","product":"php_driver","cpe":"cpe:2.3:a:mongodb:php_driver:*:*:*:*:*:mongodb:*:*","source":"nvd"},{"ranges":[{"status":"affected","fixed":"1.21.4"},{"status":"affected","introduced":"2.0.0","fixed":"2.4.1"}],"vendor":"mongodb","product":"php_library","cpe":"cpe:2.3:a:mongodb:php_library:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://jira.mongodb.org/browse/PHPLIB-1927","tags":["vendor-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/mongodb/mongo-php-library/releases/tag/1.21.4","tags":["product","release-notes","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/mongodb/mongo-php-library/releases/tag/2.4.1","tags":["product","release-notes","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/mongodb/mongo-php-driver/releases/tag/1.21.6","tags":["product","release-notes","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/mongodb/mongo-php-driver/releases/tag/2.4.1","tags":["product","release-notes","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/mongodb/mongo-php-library/security/advisories/GHSA-65fr-j4p9-vc33","tags":["web"],"sources":["ghsa"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-81525","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/mongodb/mongo-php-library/pull/1967","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/mongodb/mongo-php-library/pull/1968","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/mongodb/mongo-php-library/commit/3a462213bb4fd46efa58a1937b06b1b0553b67a7","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/mongodb/mongo-php-library/commit/6f305a3b21740080255a3093b12458274c7cc8ca","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/mongodb/mongo-php-driver/releases/tag/1.21.7","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/mongodb/mongo-php-library","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"mongodb","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-08-28T15:48:47.805Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-81525","url":"https://www.cve.org/CVERecord?id=CVE-2026-81525","licence":"CVE Terms of Use","modified":"2026-08-28T15:49:03.964Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-65fr-j4p9-vc33","url":"https://github.com/advisories/GHSA-65fr-j4p9-vc33","licence":"CC-BY-4.0","modified":"2026-09-08T21:56:03.177Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-81525","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-81525","licence":"Public domain","modified":"2026-09-29T19:17:04.850Z"}],"updatedAt":"2026-11-25T22:59:35.543Z","epss":{"score":0.00398,"percentile":0.36123,"date":"2026-12-01T12:00:22.000Z"}}