CVE-2026-125120
### 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` ### Workarounds Middleware: ```javascript mongoose.plugin(function() { schema.pre('countDocuments', function() { // This will always apply `sanitizeFilter` on `countDocuments` mongoose.sanitizeFilter(this.getFilter()); }); }); ```
Properties
- Summary
- Mongoose: sanitizeFilter not applied on countDocuments
- Severity
- critical
- Nvd fetched at
- 2026-11-10T23:33:48.924589+00:00
- Epss score
- 0.00566
- Cvss score
- 9.8
- Cvss severity
- CRITICAL
- Retrieved at
- 2026-11-10T23:35:17+00:00
- Ghsa published
- 2026-11-10T19:37:32Z
- Source url
- https://github.com/advisories/GHSA-pcrw-h46h-c93h
- Ghsa updated
- 2026-11-10T19:37:33Z
- Ghsa id
- GHSA-pcrw-h46h-c93h
- Last source
- FIRST EPSS
- Score
- 9.8
- Cvss version
- 3.1
- Cve id
- CVE-2026-125120
- Cvss vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- First seen by Signal
- 2026-11-10T03:20:43+00:00
- Is ghsa only
- false
- Vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Published at
- 2026-11-09T23:17:22.587
Related Entities (3)
AFFECTS (1)
HAS_WEAKNESS (1)
VULNERABLE_TO (1)
Related research
Explore deeper with Ninja Signal's threat intelligence graph