CVE-2026-88023: GridFS data disclosure and deletion via query-operator injection in file IDs in the MongoDB PHP Library
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
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
composer/mongodb/mongodbto a version that resolves this vulnerability.Fixed in 2.4.2 - Upgrade
Upgrade
composer/mongodb/mongodbto a version that resolves this vulnerability.Fixed in 1.24.5 - Upgrade
Upgrade
MongoDB PHP Libraryto a version that resolves this vulnerability.Fixed in 1.21.5 - Upgrade
Upgrade
MongoDB PHP Libraryto a version that resolves this vulnerability.Fixed in 2.4.2 - Compensating control
Validate GridFS IDs before using them in GridFS operations.
Event History
Frequently Asked Questions
Who is realistically exposed to exploitation?
Applications using the GridFS component are exposed where an authenticated user can influence the file identifier passed into affected GridFS operations. The issue is in application handling of caller-supplied structured identifiers, rather than requiring unauthenticated access.
What does an attacker need to exploit this issue?
An attacker needs authenticated access and the ability to cause the application to pass a structured file identifier to the affected GridFS logic. No user interaction is required, and the attack can be performed over the network.
What is the potential impact on stored files?
An attacker may read file content beyond the intended file, rename a different stored file, or remove all GridFS chunks in the affected bucket. Removing the chunks renders stored file content unreadable.