Mongoose: `sanitizeFilter` bypass via MongoDB internal top-level query operators such as `$_internalSchemaXor`
- CVE-2026-142595
- GHSA-25v4-hrwm-qj9f
- EUVD-2026-141930
Description
Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment. From 6.0.0 until 6.13.13, 7.8.14, 8.24.10, and 9.12.2, Mongoose's sanitizeFilter rejects only a small named set of top-level operators and does not recursively inspect undocumented operators such as $_internalSchemaXor and $_internalSchemaCond. Applications that pass attacker-controlled filter keys to queries while relying on sanitizeFilter can therefore accept nested selectors such as $ne or $regex, allowing authentication bypass, disclosure of protected values through boolean queries, or unintended updates and deletions. Applications that construct filters from individual primitive values are not affected by this bypass. This issue is fixed in versions 6.13.13, 7.8.14, 8.24.10, and 9.12.2.
Text from the CVE.org record.
Recommendation
mongoose
- If you run a version from 9.0.0 to before 9.12.2update to 9.12.2 or laterMinor version change: check the release notesmongoose 9.12.2 on its registry (opens in a new tab)
- If you run a version from 8.0.0 to before 8.24.10update to 8.24.10 or laterMinor version change: check the release notesmongoose 8.24.10 on its registry (opens in a new tab)
- If you run a version from 7.0.0 to before 7.8.14update to 7.8.14 or laterMinor version change: check the release notesmongoose 7.8.14 on its registry (opens in a new tab)
- If you run a version before 6.13.13update to 6.13.13 or latermongoose 6.13.13 on its registry (opens in a new tab)
Taken from the version ranges the sources state. Check the vendor advisory: nothing is said about versions the ranges do not list. Breaking-change risk is read from the version numbers only.
Affected
Automattic mongoose
Affected versions Fixed in >= 6.0.0, < 6.13.13 none stated >= 7.0.0, < 7.8.14 none stated >= 8.0.0, < 8.24.10 none stated >= 9.0.0, < 9.12.2 none stated mongoosenpm
Affected versions Fixed in from 9.0.0 to before 9.12.2 9.12.2 from 8.0.0 to before 8.24.10 8.24.10 from 7.0.0 to before 7.8.14 7.8.14 before 6.13.13 6.13.13
Product versions from the CVE.org record.
Timeline
- Published
Related news
No article from the followed outlets names this vulnerability.