MediumGHSA-8fxw-fmj8-xp7jCVE-2026-88023

MongoDB: GridFS data disclosure and deletion via query-operator injection in file IDs

Published 5 Oct 2026 · Updated 9 Nov 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.1.0 <1.21.5
Fixed in
1.21.5
Update to the fixed version for your release line, for example:composer require mongodb/mongodb:^1.21.5
Affected
>=2.0.0 <2.4.2
Fixed in
2.4.2
Update to the fixed version for your release line, for example:composer require mongodb/mongodb:^2.4.2

Details

Impact

Improper neutralization of special elements in data query logic in the GridFS component of the MongoDB PHP Library can cause a caller-supplied structured file identifier to be interpreted as a query condition rather than as a literal identifier. An authenticated user who can influence the identifier passed by an affected application may obtain stored file content beyond the intended target or cause all GridFS file chunks in the affected bucket to be removed, rendering stored file content unreadable. The affected rename operation may also rename a stored file other than the intended target.

Patches

Fixed in 1.21.5 and 2.4.2.

Workarounds

Validate GridFS IDs.

References

https://jira.mongodb.org/browse/PHPLIB-1929

Is GHSA-8fxw-fmj8-xp7j 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

  • HighCVE-2026-81525mongodb: Reject "." and NUL bytes in database and collection names · 8 Sept 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.