# CVE-2026-81525: Cross-tenant database retargeting via dot/NUL injection in namespace strings in the PHP Driver

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 8.6
- **CVSS:** 8.6 (v4.0, CNA) `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`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Attack requirements: None; Privileges required: Low; User interaction: None; Confidentiality impact: High; Integrity impact: High; Availability impact: None; Confidentiality impact on other systems: None; Integrity impact on other systems: None; Availability impact on other systems: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 0.49% (percentile 35, 2026-11-28)
- **CWE:** CWE-943
- **Aliases:** GHSA-65fr-j4p9-vc33
- **Published:** 2026-08-27T18:32:26.493Z
- **Modified:** 2026-09-29T19:17:04.850Z

## Who should check

- Projects that depend on Packagist package mongodb/mongodb (\< 1.21.4)
- Anyone running MongoDB PHP Library \< 1.21.4; \>= 2.0.0, \< 2.4.1
- Anyone running MongoDB PHP Extension \< 1.21.6; \>= 2.0.0, \< 2.4.1

## Description

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.

## Affected and fixed versions

- Packagist `mongodb/mongodb`: affected \< 1.21.4; fixed 1.21.4, 2.4.1 (osv)
- MongoDB PHP Library: \< 1.21.4; \>= 2.0.0, \< 2.4.1 (cvelist)
- MongoDB PHP Extension: \< 1.21.6; \>= 2.0.0, \< 2.4.1 (cvelist)

## Mitigation

- Upgrade mongodb/mongodb to one of 1.21.4, 2.4.1 (or later in the same release line).

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-81525. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-81525.md
Affected: mongodb/mongodb < 1.21.4
Fixed in: 1.21.4, 2.4.1

Steps:
1. Search this machine and project for mongodb/mongodb (Packagist), MongoDB PHP Library, MongoDB PHP Extension: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-81525 being exploited?

There is no confirmed exploitation: CVE-2026-81525 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.49% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2026-81525?

High: CVSS 8.6 (v4.0, scored by CNA). Remote, login needed.

### Which versions are affected by CVE-2026-81525?

mongodb/mongodb \< 1.21.4.

### Is there a fix for CVE-2026-81525?

Yes. Fixed in 1.21.4, 2.4.1. Upgrade mongodb/mongodb to one of 1.21.4, 2.4.1 (or later in the same release line).

### How do I check if I'm affected by CVE-2026-81525?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://jira.mongodb.org/browse/PHPLIB-1927>
- vendor: <https://github.com/mongodb/mongo-php-library/security/advisories/GHSA-65fr-j4p9-vc33>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2026-81525>
- patch: <https://github.com/mongodb/mongo-php-library/pull/1967>
- patch: <https://github.com/mongodb/mongo-php-library/pull/1968>
- patch: <https://github.com/mongodb/mongo-php-library/commit/3a462213bb4fd46efa58a1937b06b1b0553b67a7>
- patch: <https://github.com/mongodb/mongo-php-library/commit/6f305a3b21740080255a3093b12458274c7cc8ca>
- other: <https://github.com/mongodb/mongo-php-library/releases/tag/1.21.4>
- other: <https://github.com/mongodb/mongo-php-library/releases/tag/2.4.1>
- other: <https://github.com/mongodb/mongo-php-driver/releases/tag/1.21.6>
- other: <https://github.com/mongodb/mongo-php-driver/releases/tag/2.4.1>
- other: <https://github.com/mongodb/mongo-php-driver/releases/tag/1.21.7>
- other: <https://github.com/mongodb/mongo-php-library>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-81525>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-65fr-j4p9-vc33> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2026-81525> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-81525>
