6.1medium
GridFS data disclosure and deletion via query-operator injection in file IDs in the MongoDB Python Driver
- Severity
- 6.1medium CVSS:4.0 by mongodb
- Exploit likelihood
- 0.27% (higher than 19% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- mongodb
- Also known as
- GHSA-8fvv-fgr5-f8chPYSEC-2026-4294
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| MongoDB Python Driver | from 1.6.0 before 4.18.1 | CVE List |
| pymongo (PyPI) | before 4.18.1 | GitHub Advisory Database, PyPA Advisory Database |
| mongodb python_driver | from 1.6 before 4.18.1 | NVD |
All scores
| mongodb | 6.1medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:H/VA:H/SC:N/SI:N/SA:N |
| mongodb | 8.3high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:H |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:H/VA:H/SC:N/SI:N/SA:N |
| PyPA Advisory Database | Not scored CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:H/VA:H/SC:N/SI:N/SA:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
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.
GitHub Advisory Database
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.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-88029 changed 2026-09-10 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-8fvv-fgr5-f8ch changed 2026-10-15 | CC-BY-4.0 |
| NVD | CVE-2026-88029 changed 2026-09-29 | Public domain |
| PyPA Advisory Database | PYSEC-2026-4294 changed 2026-10-15 | CC-BY-4.0 |