---
title: "CVE-2026-125120: Mongoose: sanitizeFilter not applied on countDocuments"
url: https://erroneo.us/security/cve/CVE-2026-125120/
description: "CVE-2026-125120 (mongoose (npm)): Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment. Prior to 6.13.11, 7.8.12…"
type: vulnerability-record
section: "Security Digest"
date_published: 2026-11-09
date_modified: 2026-11-13
publisher: erroneo.us
author: erroneo.us Security Desk
cve: "CVE-2026-125120"
kev: false
cvss: 9.8
epss: 0.00566
license: All rights reserved. Quote with attribution and a link.
---

# CVE-2026-125120: Mongoose: sanitizeFilter not applied on countDocuments

**Signal:** Critical and remotely reachable. No known exploitation yet, but it is network-reachable without credentials. (Computed from CISA KEV, EPSS and CVSS; not an editorial verdict.)

## Should you act?

- No confirmed exploitation. It is not in CISA’s KEV catalog and CISA’s SSVC assessment records no known exploitation. That can change quickly after a public write-up; re-check if you are affected.
- EPSS 0.6% , percentile 48: FIRST’s model estimates a 0.6% chance of exploitation activity in the next 30 days, higher than 48% of all scored CVEs (low). EPSS is a probability, not a verdict.
- Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
- Only applies if your dependency tree includes mongoose (npm) < 6.13.11, fixed in 6.13.11 ; mongoose (npm) >= 7.0.0, < 7.8.12, fixed in 7.8.12 ; mongoose (npm) >= 8.0.0, < 8.24.3, fixed in 8.24.3 ; mongoose (npm) >= 9.0.0, < 9.9.2, fixed in 9.9.2 . Check your lockfile, including transitive dependencies.

## What it is

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.

## Affected packages

- npm `mongoose` < 6.13.11 → fixed: 6.13.11
- npm `mongoose` >= 7.0.0, < 7.8.12 → fixed: 7.8.12
- npm `mongoose` >= 8.0.0, < 8.24.3 → fixed: 8.24.3
- npm `mongoose` >= 9.0.0, < 9.9.2 → fixed: 9.9.2

## Affected products (CVE record)

- Automattic mongoose: < 6.13.11, >= 7.0.0, < 7.8.12, >= 8.0.0, < 8.24.3, >= 9.0.0, < 9.9.2

## Severity

- GitHub_M CVSS 3.1: 9.8 `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub CVSS 3.1: 9.8 `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## Exploitation

- CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
- CISA SSVC assessment: exploitation none , automatable no , technical impact total .
- FIRST EPSS (model of 2026-11-21): 0.57% probability of exploitation activity in the next 30 days; percentile 48.

## Sources

- [GitHub Advisory GHSA-pcrw-h46h-c93h](https://github.com/advisories/GHSA-pcrw-h46h-c93h)
- [CVE.org record CVE-2026-125120](https://www.cve.org/CVERecord?id=CVE-2026-125120)
- [NVD entry CVE-2026-125120](https://nvd.nist.gov/vuln/detail/CVE-2026-125120)
- [github.com](https://github.com/Automattic/mongoose/security/advisories/GHSA-pcrw-h46h-c93h)
- [github.com](https://github.com/Automattic/mongoose/commit/7e912af3fac52cb0eea4cd71e24d65318916831a)
- [github.com](https://github.com/Automattic/mongoose/commit/8b10d5760bb181f5bf5d01495cde161c8aed0557)
- [github.com](https://github.com/Automattic/mongoose/commit/b1df045aab076b740fdaec14a15a44c694b85b7d)
- [github.com](https://github.com/Automattic/mongoose/commit/b5003d3915db1cf9209c38a4b93cf3a92cddd710)
- [github.com](https://github.com/Automattic/mongoose/releases/tag/6.13.11)
- [github.com](https://github.com/Automattic/mongoose/releases/tag/7.8.12)
- [github.com](https://github.com/Automattic/mongoose/releases/tag/8.24.3)
- [github.com](https://github.com/Automattic/mongoose/releases/tag/9.9.2)

---
Source page: https://erroneo.us/security/cve/CVE-2026-125120/ · Security Digest: https://erroneo.us/security/ · More: https://erroneo.us/llms.txt
