# pymongo: PYTHON-5994 Use exact match for file ID in GridFS delete methods

Advisory record · `GHSA-8fvv-fgr5-f8ch`

- **Identifiers:** `GHSA-8fvv-fgr5-f8ch` · `CVE-2026-88029` · `PYSEC-2026-4294`
- **State:** Confirmed
- **Severity:** CVSS 6.1 Medium
- **Critical:** No
- **Weakness (CWE):** [CWE-943](https://cwe.mitre.org/data/definitions/943.html)
- **Tags:** [Other injection](https://agentprime.io/advisories/tag/injection.md)
- **Published:** 5 Oct 2026
- **Updated:** 15 Oct 2026
- **Reviewed by a person:** No

Published by the GitHub Advisory Database at 5 Oct 2026, 23:27 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

## Affected packages

- `pymongo` (PyPI): affected `<4.18.1`; fixed in `4.18.1`

## Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

> pymongo versions before 4.18.1 are affected. Passing a hash instead of a GridFS file ID can make it act as query criteria that override the ID match, so reads, writes or deletes may affect other files. The source does not say what access an attacker needs. Upgrade to pymongo 4.18.1 or later, or until then, pass only exact IDs to GridFS.

Written 1 Nov 2026.

## Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

## Severity and exploitation

- 6.1 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`, from CNA (mongodb)

- **CISA KEV:** Not listed.
- **EPSS:** 0.0027, the 18th percentile, on 8 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

- 31 Oct 2026, 14:08 UTC: First seen by agentprime
- 31 Oct 2026, 14:08 UTC: [Confirmed by OSV](https://osv.dev/vulnerability/GHSA-8fvv-fgr5-f8ch)

## Sources

- [GitHub Advisory Database: GHSA-8fvv-fgr5-f8ch](https://github.com/advisories/GHSA-8fvv-fgr5-f8ch)
- [OSV: GHSA-8fvv-fgr5-f8ch](https://osv.dev/vulnerability/GHSA-8fvv-fgr5-f8ch)
- <https://github.com/mongodb/mongo-python-driver/security/advisories/GHSA-8fvv-fgr5-f8ch>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-88029>
- <https://github.com/mongodb/mongo-python-driver/pull/3046>
- <https://github.com/mongodb/mongo-python-driver/commit/3ef1c607859589a0086446ad6f557791a2813681>
- <https://github.com/mongodb/mongo-python-driver/commit/fa676586ba4b399168a4d1d41c30dc2166cc44fd>
- <https://github.com/mongodb/mongo-python-driver>
- <https://github.com/mongodb/mongo-python-driver/releases/tag/4.18.1>
- <https://jira.mongodb.org/browse/PYTHON-5992>

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.

## Check whether this affects you

A Match means an installed version is in the affected range above. Most don’t affect the app; agentprime hasn’t analysed this one yet.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), ask your agent to check the project: `check_lockfile` sends a lockfile, `check_packages` a list of installed packages, and both return the Matches and the upgrades that clear them. `get_advisory` returns this record. Setup: <https://agentprime.io/mcp.md>
- In a browser: <https://agentprime.io/check/> reads your lockfile in the browser, never uploading it.
- Whether it touches your code, with file and line: the Claude Code plugin, <https://agentprime.io/plugin.md>
- As JSON: <https://api.agentprime.io/v1/advisories/GHSA-8fvv-fgr5-f8ch>, or `POST https://api.agentprime.io/v1/match` with your packages (<https://agentprime.io/api.md>)

---

The web page: <https://agentprime.io/advisories/GHSA-8fvv-fgr5-f8ch/>. Everything for agents: <https://agentprime.io/llms.txt>.
