CVE-2026-88029: pymongo PYTHON-5994 Use Exact Match For Vulnerability

MODERATE
Advisory Identifier: GHSA-8fvv-fgr5-f8ch
CWE-943
Published
Advisory Summary

CVE-2026-88029 is a MODERATE python-5994 use exact match for vulnerability (CWE-943: Improper Neutralization of Special Elements in Data Query Logic) affecting pymongo libraries in the PyPI ecosystem. The issue involves python-5994 use exact match for file id in gridfs delete methods. Remediation is available by upgrading affected packages to version 4.18.1.

CVE-2026-88029 at a Glance

CVE Identifier CVE-2026-88029
GHSA Identifier GHSA-8fvv-fgr5-f8ch
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-943: Improper Neutralization of Special Elements in Data Query Logic
Affected Product pymongo
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2026-88029

To remediate this vulnerability, upgrade all affected pymongo dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

pymongo fixed: 4.18.1
pip install pymongo>=4.18.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show pymongo

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-88029, inspect your installed packages using pip:

pip show pymongo

Analyze the terminal output to locate any version of pymongo in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.18.1), your application is affected.

Note: The pip show pymongo command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-943: Improper Neutralization of Special Elements in Data Query Logic, where the product generates a query intended to access or manipulate data in a data store such as a database, but it does not neutralize or incorrectly neutralizes special elements that can modify the intended logic of the query. In pymongo, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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.

CVE-2026-88029 Affected pymongo Versions

1 component(s)
Fixed Versions:
4.18.1
Product / Package Ecosystem Affected Versions Fixed Version
pymongo
PyPI
< 4.18.1
4.18.1

References

Frequently Asked Questions

What is CVE-2026-88029?
CVE-2026-88029 is a security vulnerability in pymongo involving PYTHON-5994 Use exact match for file ID in GridFS delete methods under CWE-943: Improper Neutralization of Special Elements in Data Query Logic.
Which pymongo versions are affected?
Affected versions include releases prior to 4.18.1 across affected packages: pymongo.
What version fixes CVE-2026-88029?
Upgrading to 4.18.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is pymongo affected?
Yes, pymongo is affected in releases prior to 4.18.1. Upgrade your dependency to 4.18.1 or later.
What CWE is associated with CVE-2026-88029?
CVE-2026-88029 is classified under CWE-943: Improper Neutralization of Special Elements in Data Query Logic (The product generates a query intended to access or manipulate data in a data store such as a database, but it does not neutralize or incorrectly neutralizes special elements that can modify the intended logic of the query.).
How can I check PyPI dependencies for CVE-2026-88029?
Run the dependency tree command: 'pip show pymongo'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-8fvv-fgr5-f8ch",
  "modified" : "2026-10-05T23:27:13Z",
  "published" : "2026-10-05T23:27:13Z",
  "aliases" : [ "CVE-2026-88029" ],
  "summary" : "pymongo: PYTHON-5994 Use exact match for file ID in GridFS delete methods",
  "details" : "### Impact\n\nWhen 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.\n\n### Patches\nPatch available in pymongo >= 4.18.1\n\n### Workarounds\nEnsure your existing workflow _only_ supports exact matching on the GridFS API.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "pymongo"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.18.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 4.18.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/mongodb/mongo-python-driver/security/advisories/GHSA-8fvv-fgr5-f8ch"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-88029"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mongodb/mongo-python-driver/pull/3046"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mongodb/mongo-python-driver/commit/3ef1c607859589a0086446ad6f557791a2813681"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mongodb/mongo-python-driver/commit/fa676586ba4b399168a4d1d41c30dc2166cc44fd"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/mongodb/mongo-python-driver"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mongodb/mongo-python-driver/releases/tag/4.18.1"
  }, {
    "type" : "WEB",
    "url" : "https://jira.mongodb.org/browse/PYTHON-5992"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-943" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-10-05T23:27:13Z",
    "nvd_published_at" : null
  }
}