BuzzPHP
LightDarkSystem

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

High severity. Published 8 September 2026. Update mongodb/mongodb to the fixed version of your branch (1.21.4, 2.4.1): composer update mongodb/mongodb.

Which versions are affected?

PackageAffected versionsFixed in
mongodb/mongodb (opens in a new tab)< 1.21.4 | >= 2.0.0, < 2.4.11.21.4, 2.4.1

What should you do?

Update every affected package you use to its fixed version, then check that nothing else in your project matches an advisory. To see which version you run, and whether anything is still affected:

composer show mongodb/mongodb
composer audit

Advisory details

SeverityHighCVSS 8.1
Published
Updated
CVECVE-2026-81525 (opens in a new tab)
GHSAGHSA-65fr-j4p9-vc33 (opens in a new tab)
WeaknessCWE-943

What the advisory says

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.

Source: GHSA-65fr-j4p9-vc33 (opens in a new tab) in the GitHub Advisory Database (CC BY 4.0). Data from GitHub (opens in a new tab) as of .

Other recent advisories for this package

All Composer security advisories