CVE-2026-88029: GridFS data disclosure and deletion via query-operator injection in file IDs in the MongoDB Python Driver

Published Sep 10, 2026
·
Updated

Impact

When reading/writing via an ID with the GridFS API, require an exact match on the given ID. Otherwise, if a Hash is given in place of the ID, it may be interpreted as criteria, overriding the ID match.

Patches Patch available in pymongo >= 4.18.1

Workarounds Ensure your existing workflow only supports exact matching on the GridFS API.

Other sources

Improper neutralization of special elements in data query logic in the GridFS component of the MongoDB Python Driver 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.

— MITRE

Affected Software

3 affected componentsFixes available
pypi/pymongo
MongoDB Python Driver Mongodb>=1.6<4.18.1
pip/pymongo<=4.18.0
4.18.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/pymongo to a version that resolves this vulnerability.

    Fixed in 4.18.1
  2. Upgrade

    Upgrade pymongo to a version that resolves this vulnerability.

    Fixed in 4.18.1
  3. Configuration

    Require exact matching on the given file ID when reading, writing, or otherwise operating via the GridFS API; do not interpret structured IDs or hashes as query criteria.

    GridFS API ID matching = exact match only

Event History

Sep 10, 2026
CVE Published
via MITRE·05:56 PM
Data Sourced
via MITRE·05:56 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·06:18 PM
DescriptionSeverityWeaknessAffected Software
Oct 5, 2026
Advisory Published
via GitHub·11:27 PM
Data Sourced
via GitHub·11:27 PM
DescriptionWeaknessAffected Software

Frequently Asked Questions

1

Who is exposed to this issue?

Applications using the MongoDB Python Driver's GridFS component are exposed if an authenticated user can influence the file identifier passed into affected GridFS operations. The attacker does not need user interaction and can exploit the issue remotely through the application.

2

What could an attacker do with control of a GridFS file identifier?

A structured identifier can be interpreted as a query condition instead of a literal ID. This may allow access to file content beyond the intended file, deletion of all file chunks in the affected bucket so stored content becomes unreadable, or renaming a different stored file.

3

How can we tell whether our application is at risk?

Review application paths that pass caller-controlled values as GridFS file identifiers, particularly operations that read, delete, or rename files. Risk exists when those values can be structured rather than being constrained to a literal identifier before they reach GridFS.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203