AI and data stack advisories

Severe, 6 weeks1496Projects326

1496 severe, 6 weeks · 326 projects

MongoDBGHSA-69mc-2wv2-rcr5

GridFS data deletion via operator-document injection in file IDs

MongoDB

CVE-2026-88031 · Published Sep 10, 2026

Medium6.1
Fix: upgrade to 1.17.10 or later (2 fixed versions below)
GitHub advisory

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

PackageAffectedFixed in
go.mongodb.org/mongo-driver/mongo/gridfs
Go
< 1.17.101.17.10
go.mongodb.org/mongo-driver/v2/mongo
Go
< 2.9.12.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