GridFS data deletion via operator-document injection in file IDs
Medium6.1CVE-2026-88031 · Published Sep 10, 2026
### Impact In GridFS delete methods, the file ID lookup could match more loosely than intended, potentially causing unintended file (and chunk) deletions instead of an exact match on the given file ID. ### Patches Upgrade to Go Driver v2.9.1 / v1.17.10 or later. ### Workarounds Users can manually restrict the file ID with a `$eq` operator before passing it to GridFSBucket methods using code like the following. ``` go func exactMatch(id any) bson.D { return bson.D{{"$eq", id}} } // e.g., for v1, (*Bucket).DeleteContext() with an exact match on the file ID. bucket.DeleteContext(context.TODO(), exactMatch(id)) // e.g., for v2, (*GridFSBucket).Delete() with an exact match on the file ID. gridFSBucket.Delete(context.TODO(), exactMatch(id)) ``` ### References [GODRIVER-4081](https://jira.mongodb.org/browse/GODRIVER-4081)
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| go.mongodb.org/mongo-driver/mongo/gridfs Go | < 1.17.10 | 1.17.10 |
| go.mongodb.org/mongo-driver/v2/mongo Go | < 2.9.1 | 2.9.1 |
Details and references
- CVSS 4.0
- CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N
- Severity from
- GitHub (reviewed advisory)
More MongoDB advisories
All MongoDB| Date | Advisory | Severity | Fixed in |
|---|---|---|---|
| Sep 11 | GridFS data disclosure and deletion via query-operator injection in file IDs | Medium6.1 | 1.30.10+1 more |
| Sep 10 | Application denial of service via cancellation race in reactive client-side encryption in MongoDB Java Driver | High8.2 | 5.11.1+1 more |
| Sep 10 | GridFS data disclosure and deletion via query-operator injection in file IDs in the MongoDB Java Driver | High8.3 | 5.11.1+1 more |
| Sep 10 | Regular expression injection via unescaped characters in LINQ query translation | High7.1 | 3.11.2 |
| Sep 10 | GridFS data disclosure and deletion via query-operator injection in file IDs | Medium6.1 | 3.11.2 |
| Sep 10 | GridFS data disclosure and deletion via query-operator injection in file IDs | Medium6.1 | 3.9.1 |