CVE-2026-125120Mongoose Vulnerability
Mongoose: sanitizeFilter not applied on countDocuments
Published Nov 9, 2026 · Updated Nov 11, 2026 · Also known as EUVD-2026-120503, GHSA-pcrw-h46h-c93h
Key Facts
Patch in the next maintenance window- CVE-2026-125120 is a critical-severity vulnerability (CVSS 9.8 v3.1) affecting Mongoose (npm).
- It is not listed in any known-exploited vulnerabilities catalog. No public exploit code is known.
- EPSS estimates a 0.6% probability of exploitation in the next 30 days.
- Fixed versions are available, including Mongoose 6.12.2-tuxcare.6, Mongoose 6.13.11, Mongoose 7.8.12.
- Brandefense priority: patch in the next maintenance window, because of its high severity, although no exploitation is known.
Scores
CVSS v3.1
9.8
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS (30-day exploit likelihood)
0.6%
Higher than 47.4% of all scored CVEs
Exploit maturity
None known
ATLAS score
33/100
Publication score, see How it works
Exploitation Verdict
KEV listed
Not listed
Federal due date
None
No federal due date
Ransomware use
Not reported
Attributed actors
None named
Exploit & Defence Guidance
Exploit maturity
None known
Public exploit code
0
Proof-of-concept links
In-the-wild evidence
0
Reports of active use
Advisories And Exploit References
Description
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.
^9.9.2^8.24.3^7.8.12^6.13.11
Workarounds
Middleware:
mongoose.plugin(function() {
schema.pre('countDocuments', function() {
// This will always apply `sanitizeFilter` on `countDocuments`
mongoose.sanitizeFilter(this.getFilter());
});
});
Affected Products
3 affected entries in total| Product | Affected versions | Fixed in |
|---|---|---|
| Mongoosenpm | >= 9.0.0, >= 9.0.0, | 9.9.2 |
Patched Releases
Mongoose
6.12.2-tuxcare.6, 6.13.11, 7.8.12, 8.24.3, 9.9.2
Timeline
Publicly disclosed
Nov 9, 2026
Last updated
Nov 11, 2026
Weakness Type
- CWE-943 Improper Neutralization of Special Elements in Data Query Logic
References
- advisorycve.org · CVERecord
- advisorynvd.nist.gov · CVE-2026-125120
- advisoryGHSA advisory
- othergithub.com · mongoose
- otherhttps://github.com/Automattic/mongoose/commit/7e912af3fac52cb0eea4cd71e24d65318916831a
FAQ
Common Questions.
Impact sanitizeFilter is Mongoose's mechanism for protecting against query selector injection attacks.
Affected: Mongoose (npm) versions >= 9.0.0, >= 9.0.0,. The full list is in the CVE brief.
It is not listed in any known-exploited vulnerabilities catalog.
No, it is not currently listed in the CISA Known Exploited Vulnerabilities catalog.
No public exploit code is known.
Fixed versions are available, including Mongoose 6.12.2-tuxcare.6, Mongoose 6.13.11, Mongoose 7.8.12.
Brandefense priority: patch in the next maintenance window, because of its high severity, although no exploitation is known.
Is CVE-2026-125120 On Your Attack Surface?
Brandefense matches it against the products discovered on your perimeter and opens a finding the day a CVE like this is listed.
Request A Demo