Insufficient Validation of Shard Key Values in MongoDB Server Leads to Query Operator Injection in Change Stream Post-Image Lookups
No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in Server 7.0.41, Server 8.0.30 and Server 8.3.9.
In MongoDB, insufficient validation of shard key values during document insertion allowed authenticated users to store documents with specially crafted, operator-shaped objects as shard key values in sharded collections. When change stream events for such documents were processed with the updateLookup full document mode, the crafted values were embedded into internal post-image lookup queries without proper sanitization, causing them to be interpreted as query operators rather than literal equality values. This could result in change stream consumers receiving incorrect post-image documents or encountering non-resumable fatal errors.
Affected
Vendors, products and packages with version ranges
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| MongoDB | Server | >=7.0.0 <7.0.41, >=8.0.0 <8.0.30, >=8.3.0 <8.3.9 | 7.0.41, 8.0.30, 8.3.9 |
Timeline
Every event on this vulnerability
Related
Other vulnerabilities in MongoDB, strongest first
Embed
A live severity badge for an advisory, README or ticket