Highlights
Denial of Service: 46 prior fixes. Scrutinize any change in this area.
lib/document.js: most-fixed (19 issues). Treat as high-risk during review.
43 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns
The bug types that recur here, drawn from past fixes, not open vulnerabilities.
Remote Code Execution: Attackers can exploit the $where operator nested inside populate match parameters to run arbitrary JavaScript code in the MongoDB process context. This risk is actively documented under CVE-2024-53900 and CVE-2025-23061.
NoSQL Injection: Incomplete sanitization of complex logical operators (such as $nor, $and, and $or) allows attackers to supply malicious query parameters that bypass sanitizeFilter checks to leak data or alter updates globally.
Prototype Pollution: Schema compilation and document initialization pathways historically failed to protect internal dictionaries against special keys like __proto__ or constructor, allowing malicious document structures to modify Object.prototype globally.