Mongoose: sanitizeFilter not applied on countDocuments
Summary
| CVE | CVE-2026-125120 |
|---|---|
| State | PUBLISHED |
| Assigner | GitHub_M |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-11-09 23:17:22 UTC |
| Updated | 2026-11-12 19:18:09 UTC |
| Description | 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. |
Risk And Classification
Primary CVSS: v3.1 9.8 CRITICAL from [email protected]
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Problem Types: CWE-943 | CWE-943 CWE-943: Improper Neutralization of Special Elements in Data Query Logic
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | [email protected] | Secondary | 9.8 | CRITICAL | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| 3.1 | CNA | DECLARED | 9.8 | CRITICAL | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
CVSS v3.1 Breakdown
Attack Vector
NetworkAttack Complexity
LowPrivileges Required
NoneUser Interaction
NoneScope
UnchangedConfidentiality
HighIntegrity
HighAvailability
HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | Automattic | Mongoose | affected < 6.13.11 | Not specified |
| CNA | Automattic | Mongoose | affected >= 7.0.0, < 7.8.12 | Not specified |
| CNA | Automattic | Mongoose | affected >= 8.0.0, < 8.24.3 | Not specified |
| CNA | Automattic | Mongoose | affected >= 9.0.0, < 9.9.2 | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| github.com/Automattic/mongoose/commit/7e912af3fac52cb0eea4cd71e24d653189... | [email protected] | github.com | |
| github.com/Automattic/mongoose/commit/b1df045aab076b740fdaec14a15a44c694... | [email protected] | github.com | |
| github.com/Automattic/mongoose/releases/tag/6.13.11 | [email protected] | github.com | |
| github.com/Automattic/mongoose/releases/tag/7.8.12 | [email protected] | github.com | |
| github.com/Automattic/mongoose/security/advisories/GHSA-pcrw-h46h-c93h | [email protected] | github.com | |
| github.com/Automattic/mongoose/releases/tag/9.9.2 | [email protected] | github.com | |
| github.com/Automattic/mongoose/commit/b5003d3915db1cf9209c38a4b93cf3a92c... | [email protected] | github.com | |
| github.com/Automattic/mongoose/commit/8b10d5760bb181f5bf5d01495cde161c8a... | [email protected] | github.com | |
| github.com/Automattic/mongoose/releases/tag/8.24.3 | [email protected] | github.com | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
No vendor comments have been submitted for this CVE.
There are currently no legacy QID mappings associated with this CVE.