npm
CVE-2026-125120
Mongoose: sanitizeFilter not applied on countDocuments
- Severity
- Critical 9.8
- Published
- 10 Nov 2026
- Last changed
- 10 Nov 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 6.13.11, 7.8.12, 8.24.3, 9.9.2
- Exploit chance
- 0.6% in the next 30 daysHigher than 47% of CVEs. EPSS by FIRST, 24 Nov 2026
- Weakness
- NoSQL injection (CWE-943)
- Attack
- Over the network · No login needed · No user action needed
- Attacker can
- Read data · Change data · Take it down
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H- Also known as
- GHSA-pcrw-h46h-c93h
- Sources
- OSV.dev and GitHub
Description
sanitizeFilter is Mongoose's mechanism for protecting against query selector injection attacks. In older versions of Mongoose, sanitizeFilter was not applied for countDocuments() queries.
Workarounds
Middleware:
Affected software
| Software | Affected versions |
|---|---|
mongoosenpm · osv:npm:mongoose |
|
About mongoose
- Weekly downloads (npm)
- 9,379,180npm, 24 Nov 2026
Vulnerabilities in mongoose
- In our list
- 5
- Published in the last 12 months
- 5
- Critical, last 12 months
- 1
- High, last 12 months
- 2
- Known exploited
- 0
- CVE-2026-125116Mongoose: Discriminator key values matching inherited properties (e.g. __t: 'constructor') bypass schema casting and can poison collectionsMedium 4.8 10 Nov 2026
- CVE-2026-125117Mongoose walks into inherited properties when hydrating, setting, and merging, allowing overwrites of built-in functions (denial of service) and shared schema stateHigh 8.2 10 Nov 2026
- CVE-2026-125118Mongoose: Prototype pollution via Schema.prototype.virtual()Medium 6.5 10 Nov 2026
- CVE-2026-125119Mongoose: Connection-level sanitizeFilter not appliedHigh 7.5 10 Nov 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-125120
- GitHub Advisory Database https://github.com/advisories/GHSA-pcrw-h46h-c93h