MongoDB PHP Library
GridFS data disclosure and deletion via query-operator injection in file IDs in the MongoDB PHP Library
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.
Affected versions and mitigation
From the CVE record, GitHub Security Advisories and the vendor's references.Affected
- >= 1.1.0, <= 1.21.4
- >= 2.0.0, <= 2.4.1
- >= 1.1.0, < 1.21.5
Fixed in 1.21.5
from GitHub Security Advisory GHSA-8fxw-fmj8-xp7j
- >= 2.0.0, < 2.4.2
Fixed in 2.4.2
from GitHub Security Advisory GHSA-8fxw-fmj8-xp7j
Mitigation
Upgrade mongodb/mongodb to 1.21.5 or later.
Upgrade mongodb/mongodb to 2.4.2 or later.
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.