Security Digest · Vulnerability record
CVE-2026-125120: Mongoose: sanitizeFilter not applied on countDocuments
Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment.
CVSS 9.8 Critical EPSS 0.6% · p48
Should you act?
Critical and remotely reachable
No known exploitation yet, but it is network-reachable without credentials. This signal is computed from CISA KEV, EPSS and CVSS data; it is not an editorial verdict.
- No confirmed exploitation. It is not in CISA’s KEV catalog and CISA’s SSVC assessment records no known exploitation. That can change quickly after a public write-up; re-check if you are affected.
- EPSS 0.6%, percentile 48: FIRST’s model estimates a 0.6% chance of exploitation activity in the next 30 days, higher than 48% of all scored CVEs (low). EPSS is a probability, not a verdict.
- Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
- Only applies if your dependency tree includes
mongoose(npm) < 6.13.11, fixed in 6.13.11;mongoose(npm) >= 7.0.0, < 7.8.12, fixed in 7.8.12;mongoose(npm) >= 8.0.0, < 8.24.3, fixed in 8.24.3;mongoose(npm) >= 9.0.0, < 9.9.2, fixed in 9.9.2. Check your lockfile, including transitive dependencies.
What it is
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.
From the GitHub advisory
Impact
sanitizeFilter is Mongoose's mechanism for protecting against query selector injection attacks. In older versions of Mongoose, sanitizeFilter was not applied for countDocuments() queries.
Patches
Patches have been released for all supported Mongoose major release lines. Please upgrade to the following versions depending on which major version of Mongoose applications are using.
1. ^9.9.2 2. ^8.24.3 3. ^7.8.12 4. ^6.13.11
Weakness type: CWE-943.
Product: mongoose (npm) · Assigned by: GitHub_M · Published: 2026-11-09
Affected and fixed versions
| Ecosystem | Package | Vulnerable | First fixed |
|---|---|---|---|
| npm | mongoose | < 6.13.11 | 6.13.11 |
| npm | mongoose | >= 7.0.0, < 7.8.12 | 7.8.12 |
| npm | mongoose | >= 8.0.0, < 8.24.3 | 8.24.3 |
| npm | mongoose | >= 9.0.0, < 9.9.2 | 9.9.2 |
| Vendor | Product | Affected versions (per CVE record) |
|---|---|---|
| Automattic | mongoose | < 6.13.11, >= 7.0.0, < 7.8.12, >= 8.0.0, < 8.24.3, >= 9.0.0, < 9.9.2 |
Severity scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_M | 3.1 | 9.8 Critical | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
- Attack vector: network (remotely reachable)
- Attack complexity: low
- Privileges required: none (no login)
- User interaction: none
- Scope: unchanged
CVSS measures how bad a flaw is if exploited, not how likely exploitation is. Read it next to the exploitation data below.
Exploitation and urgency
- CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
- CISA SSVC assessment: exploitation none, automatable no, technical impact total.
- FIRST EPSS (model of 2026-11-21): 0.57% probability of exploitation activity in the next 30 days; percentile 48.
Timeline
- — CVE record published by GitHub_M
- — GitHub-reviewed advisory GHSA-pcrw-h46h-c93h published (critical)
- — CVE record last updated
Sources and references
Original sources first. Version and fix details should always be confirmed against the vendor or project advisory.
Vulnerability records
- GitHub Advisory GHSA-pcrw-h46h-c93h github.com
- CVE.org record CVE-2026-125120 cve.org
- NVD entry CVE-2026-125120 nvd.nist.gov
Other references from the CVE record and advisory
- github.com github.com
- github.com github.com
- github.com github.com
- github.com github.com
- github.com github.com
- github.com github.com
- github.com github.com
- github.com github.com
- github.com github.com