CVE-2026-125120: critical vulnerability in Automattic mongoose
Mongoose: sanitizeFilter not applied on countDocuments
Published · Updated
E-mail alert when it lands in KEV, gets a public PoC or its score goes up.
28Vexday Risk Score
No sign of exploitation. No public exploitation artifact known so far.
ssvc Trackcvss 9.8epss 0.6%
Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment. Prior to 6.13.11, 7.8.12, 8.24.3, and 9.9.2, Mongoose countDocuments() does not apply the configured sanitizeFilter query selector injection defense. An application that enables sanitizeFilter and passes attacker-controlled filter values to countDocuments() can therefore process query operator objects as operators rather than literal values, causing the count to include documents that should not match and potentially undermining authorization or application logic based on that count. This issue is fixed in versions 6.13.11, 7.8.12, 8.24.3, and 9.9.2.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Affected products
Automattic · mongooseRelated CVEs — Automattic mongoose
In the same product, most dangerous first.
CVE-2026-125117HIGHMongoose walks into inherited properties when hydrating, setting, and merging, allowing overwrites of built-in functions (denial of service) and shared schema stateEPSS 0.6%CVE-2026-125119HIGHMongoose: Connection-level sanitizeFilter not appliedEPSS 0.5%CVE-2026-73562MEDIUMMongoose: Prototype pollution in the update casting via __proto__-prefixed dotted path (Schema._getSchema/path getter)EPSS 0.5%CVE-2026-125118MEDIUMMongoose: Prototype pollution via Schema.prototype.virtual()EPSS 0.4%CVE-2026-125116MEDIUMMongoose: Discriminator key values matching inherited properties (e.g. __t: 'constructor') bypass schema casting and can poison collectionsEPSS 0.3%CVE-2026-42334HIGHMongoose: Improper Sanitization of $nor in sanitizeFilter May Allow NoSQL InjectionEPSS 0.3%
References
https://github.com/Automattic/mongoose/commit/7e912af3fac52cb0eea4cd71e24d65318916831ahttps://github.com/Automattic/mongoose/commit/8b10d5760bb181f5bf5d01495cde161c8aed0557https://github.com/Automattic/mongoose/commit/b1df045aab076b740fdaec14a15a44c694b85b7dhttps://github.com/Automattic/mongoose/commit/b5003d3915db1cf9209c38a4b93cf3a92cddd710https://github.com/Automattic/mongoose/releases/tag/6.13.11https://github.com/Automattic/mongoose/releases/tag/7.8.12https://github.com/Automattic/mongoose/releases/tag/8.24.3https://github.com/Automattic/mongoose/releases/tag/9.9.2https://github.com/Automattic/mongoose/security/advisories/GHSA-pcrw-h46h-c93h