CVE-2026-125120
published critical CVSS 3.1 · 9.8Mongoose: sanitizeFilter not applied on countDocuments
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Automattic | — | mongoose< 6.13.11 · >= 7.0.0, < 7.8.12 · >= 8.0.0, < 8.24.3 · >= 9.0.0, < 9.9.2 | Affected | Not stated | GitHub_M |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 9.8 / 10
- Severity
- critical
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Automattic | mongoose | < 6.13.11 (affected)>= 7.0.0, < 7.8.12 (affected)>= 8.0.0, < 8.24.3 (affected)>= 9.0.0, < 9.9.2 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-943 CWE-943: Improper Neutralization of Special Elements in Data Query Logic
References
9- https://github.com/Automattic/mongoose/commit/7e912af3fac52cb0eea4cd71e24d65318916831a
- https://github.com/Automattic/mongoose/commit/8b10d5760bb181f5bf5d01495cde161c8aed0557
- https://github.com/Automattic/mongoose/commit/b1df045aab076b740fdaec14a15a44c694b85b7d
- https://github.com/Automattic/mongoose/commit/b5003d3915db1cf9209c38a4b93cf3a92cddd710
- https://github.com/Automattic/mongoose/releases/tag/6.13.11
- https://github.com/Automattic/mongoose/releases/tag/7.8.12
- https://github.com/Automattic/mongoose/releases/tag/8.24.3
- https://github.com/Automattic/mongoose/releases/tag/9.9.2
- https://github.com/Automattic/mongoose/security/advisories/GHSA-pcrw-h46h-c93h
Provider assertions
2GitHub_M · cna
Mongoose: sanitizeFilter not applied on countDocuments
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 918cb4785cc7ed7733aa425f33fd04d3571742c15e6bd7d928a8e4c516270ccc
- Ingested
- 13 Nov 2026, 13:46:05 UTC
- Source record
- Official CVE record