GHSA-8fxw-fmj8-xp7j: Composer/mongodb/mongodb vulnerability
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 - Configuration
Validate GridFS IDs before using caller-supplied structured file identifiers.
GridFS GridFS ID validation = enabled