Skip to content
Security advisoryCVE-2026-88023

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

Moderate6.1Published Modified Original advisory

As published by the sources

Affected packages

  • mongodb/mongodb
    Affected>=1.1.0,<1.21.5 || >=2.0.0,<2.4.2
    Fixed in1.21.52.4.2

Derived from the fixed versions above

What to do

  1. Upgrade mongodb/mongodb to the fixed version in your release line: 1.21.5, 2.4.2.

    composer update mongodb/mongodb --with-dependencies

To see which version you have installed, run composer show vendor/package. Running composer audit lists the known advisories that match your installed versions.

Quoted from the original advisory

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

References

laravel.now is an independent community project. It is not affiliated with, endorsed by, sponsored by, or in any way officially connected to Laravel, Laravel LLC, Taylor Otwell, or the Laravel framework maintainers. Laravel is a trademark of Taylor Otwell. All other trademarks belong to their respective owners.

This site is operated by the makers of Lockhound. Links to Lockhound are promotional.