Mongoose: sanitizeFilter not applied on countDocuments
CVE-2026-125120Published 9 Nov 2026, 22:36 UTC
Real-world risk
8.5/ 10High
Patch this week; within 48 h if Internet-facing
PreliminaryFrom the CVSS vector only · confidence low
CVSS
9.8
scored by the vendor (CNA), CVSS 3.1
In plain words
No plain-language summary yet. The original description is below.
Original description (from GitHub_M)
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.
Am I affected?
| Product | Affected versions (from the sources) | Fixed in |
|---|---|---|
| mongooseNiche | < 6.13.11; >= 7.0.0, < 7.8.12; >= 8.0.0, < 8.24.3; >= 9.0.0, < 9.9.2 | 6.13.11, 7.8.12, 8.24.3, 9.9.2 |
What to do
Update to a fixed version: 6.13.11, 7.8.12, 8.24.3, 9.9.2.
Why this score
| Factor | Value | Evidence | × |
|---|---|---|---|
| Impact | Full compromiseCode execution or full control of the system or application | From the CVSS vector | 1.00 |
| Attacker position | InternetAnyone on the Internet can reach a typical deployment | From the CVSS vector | 1.00 |
| Privileges needed | NoneNo account | From the CVSS vector | 1.00 |
| Victim interaction | NoneNothing | From the CVSS vector | 1.00 |
| Configuration | DefaultOut-of-the-box installs are vulnerable | From the CVSS vector | 1.00 |
| Reliability | ReliableDeterministic: injection, logic bug, path traversal | From the CVSS vector | 1.00 |
Threat level T1: Nothing known (× 0.85)
The default for a new disclosure
EPSS 0.7% chance of exploitation in 30 days (percentile 56), as of 2026-12-05.
The arithmetic
- Prerequisites multiplied together1.000
- Threat T1: Nothing known0.850
- 10 × impact 1 × prerequisites 1 × threat 0.858.500
- Rounded to one decimal between 0.1 and 108.5
Exploitation and evidence timeline
- 9 Nov 2026 Published
- 3 Dec 2026 Risk 8.5 (cvss fallback)
Weakness
CWE-943
References
- https://github.com/Automattic/mongoose/security/advisories/GHSA-pcrw-h46h-c93hvendor-advisory
- https://github.com/Automattic/mongoose/commit/7e912af3fac52cb0eea4cd71e24d65318916831amisc
- https://github.com/Automattic/mongoose/commit/8b10d5760bb181f5bf5d01495cde161c8aed0557misc
- https://github.com/Automattic/mongoose/commit/b1df045aab076b740fdaec14a15a44c694b85b7dmisc
- https://github.com/Automattic/mongoose/commit/b5003d3915db1cf9209c38a4b93cf3a92cddd710misc
- https://github.com/Automattic/mongoose/releases/tag/6.13.11misc
- https://github.com/Automattic/mongoose/releases/tag/7.8.12misc
- https://github.com/Automattic/mongoose/releases/tag/8.24.3misc
- https://github.com/Automattic/mongoose/releases/tag/9.9.2misc
- CVE-2026-125120 on CVE.org