# CVE-2026-88029: MongoDB Python Driver GridFS query injection in file identifiers

Source: https://junglewise.ai/threats/cve-2026-88029-mongodb-python-driver-gridfs-query-injection-in-file-identifiers  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-10. Updated: 2026-09-26  
License: CC BY 4.0 with a link back

CVE-2026-88029 · Severity: high · CVSS 8.3 · Published 2026-09-10

MongoDB's Python Driver contains a flaw in its GridFS component that allows specially crafted file identifiers to be misinterpreted as database queries. An authenticated attacker who can control the file identifiers used by an application could read unintended files, delete stored file chunks, or rename files other than intended, potentially causing data loss or unauthorized data access.

Technologies: [pymongo (PyPI)](https://junglewise.ai/threats/technologies/pymongo). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-88029 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-88029 being exploited in the wild.

**How severe is CVE-2026-88029?** High severity, with a CVSS score of 8.3, published 10 September 2026.

**Which products and versions are affected?** pymongo (PyPI) <= 4.18.0, ECOSYSTEM:introduced=0,fixed=4.18.1.

**Is there a fix for CVE-2026-88029?** Yes. pymongo (PyPI): upgrade to 4.18.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-88029 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-88029?** Check whether you run pymongo (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- pymongo (PyPI): upgrade to 4.18.1 or later

  ```sh
  pip install "pymongo>=4.18.1"
  ```


## Technical details

The vulnerability is an improper neutralization of special elements in data query logic (CWE-89 style injection) affecting GridFS operations in the MongoDB Python Driver. The root cause is that user-supplied file identifiers are not properly escaped using equality matching ($eq) in database commands, allowing attackers to inject query logic. An authenticated user who can influence the file identifier parameter passed by an affected application can exploit operations like delete, rename, and read to access or modify unintended files. The fix, available in version 4.18.1, implements strict equality matching for all user-supplied GridFS file IDs using the $eq operator.

## Affected products

- MongoDB Python Driver before 4.18.1

## Identifiers

- CVE-2026-88029
- GHSA-8fvv-fgr5-f8ch
- PYSEC-2026-4294

## Timeline

- 2026-09-10: disclosed
- 2026-09-10: patched: Fix released in version 4.18.1

## References

- [https://jira.mongodb.org/browse/PYTHON-5994](https://jira.mongodb.org/browse/PYTHON-5994)

## Related threats

- [MongoDB Python Driver out-of-bounds read in BSON decoding](https://junglewise.ai/threats/duplicate-advisory-python-6110-out-of-bounds-read-in-bson-decoding-via-96ff82c3)
- [MongoDB Python Driver buffer over-read in BSON regex parsing](https://junglewise.ai/threats/cve-2026-106435-the-mongodb-python-driver-s-binary-accelerator-can-read-outside)
- [MongoDB Python Driver integer overflow in BSON encoding](https://junglewise.ai/threats/cve-2026-96749-an-integer-overflow-in-the-bson-document-encoding-component-of)
- [PyMongo connection string parsing host injection](https://junglewise.ai/threats/cve-2026-96748-pymongo-s-connection-string-parsing-decodes-percent-encoded)
- [MongoDB Python Driver Unix socket misinterpretation in key management](https://junglewise.ai/threats/cve-2026-96747-the-client-side-field-level-encryption-support-in-the-mongodb)
