HighGHSA-65fr-j4p9-vc33CVE-2026-81525

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

Published 8 Sept 2026 · Updated 8 Sept 2026

Is your project on an affected mongodb/mongodb?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Laravel or PHP apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected packages

Affected
<1.21.4
Fixed in
1.21.4
Update to the fixed version for your release line, for example:composer require mongodb/mongodb:^1.21.4
Affected
>=2.0.0 <2.4.1
Fixed in
2.4.1
Update to the fixed version for your release line, for example:composer require mongodb/mongodb:^2.4.1

Details

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.

Is GHSA-65fr-j4p9-vc33 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected mongodb/mongodb, and gives you the command that fixes it.

More advisories for mongodb/mongodb

  • MediumCVE-2026-88023MongoDB: GridFS data disclosure and deletion via query-operator injection in file IDs · 5 Oct 2026
  • MediumCVE-2021-32050MongoDB Driver may publish events containing authentication-related data · 29 Aug 2023
mongodb/mongodb security overview

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.