# mongodb: Reject "." and NUL bytes in database and collection names

High severity, published 2026-09-08. Update mongodb/mongodb to the fixed version of your branch (1.21.4, 2.4.1): composer update mongodb/mongodb.

Canonical URL: https://buzzphp.com/security/ghsa-65fr-j4p9-vc33 · Data from GitHub as of 2026-11-25.

| | |
| --- | --- |
| Severity | high (CVSS 8.1) |
| Published | 2026-09-08 |
| Updated | 2026-09-08 |
| CVE | [CVE-2026-81525](https://nvd.nist.gov/vuln/detail/CVE-2026-81525) |
| GHSA | [GHSA-65fr-j4p9-vc33](https://github.com/advisories/GHSA-65fr-j4p9-vc33) |
| Weakness | CWE-943 |

| Package | Affected versions | Fixed in |
| --- | --- | --- |
| mongodb/mongodb | < 1.21.4 or >= 2.0.0, < 2.4.1 | 1.21.4, 2.4.1 |

## What to do

Update mongodb/mongodb to the fixed version of your branch (1.21.4, 2.4.1): composer update mongodb/mongodb.

Check which version you run with `composer show mongodb/mongodb`, and every affected package with `composer audit`.

## About this advisory

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.

## Links

- [GHSA-65fr-j4p9-vc33 on GitHub](https://github.com/advisories/GHSA-65fr-j4p9-vc33)
- [CVE-2026-81525 on the National Vulnerability Database](https://nvd.nist.gov/vuln/detail/CVE-2026-81525)
- [All Composer security advisories](https://buzzphp.com/security)
