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.
Patch available in pymongo >= 4.18.1
Ensure your existing workflow only supports exact matching on the GridFS API.
{
"cwe_ids": [
"CWE-943"
],
"github_reviewed": true,
"github_reviewed_at": "2026-10-05T23:27:13Z",
"nvd_published_at": null,
"severity": "MODERATE"
}