CVE-2026-88029: pymongo PYTHON-5994 Use Exact Match For Vulnerability
MODERATECVE-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
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.
pip install pymongo>=4.18.1
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
CVE-2026-88029 Affected pymongo Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
pymongo
|
PyPI |
< 4.18.1
|
4.18.1
|
References
Frequently Asked Questions
What is CVE-2026-88029?
Which pymongo versions are affected?
What version fixes CVE-2026-88029?
Is pymongo affected?
What CWE is associated with CVE-2026-88029?
How can I check PyPI dependencies for CVE-2026-88029?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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
}
}