Security Digest · Vulnerability record

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

Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment.

CVSS 9.8 Critical EPSS 0.6% · p48

Should you act?

Critical and remotely reachable

No known exploitation yet, but it is network-reachable without credentials. This signal is computed from CISA KEV, EPSS and CVSS data; it is not an editorial verdict.

  • 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.

From the GitHub advisory

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

Weakness type: CWE-943.

Product: mongoose (npm) · Assigned by: GitHub_M · Published: 2026-11-09

Affected and fixed versions

EcosystemPackageVulnerableFirst fixed
npmmongoose< 6.13.116.13.11
npmmongoose>= 7.0.0, < 7.8.127.8.12
npmmongoose>= 8.0.0, < 8.24.38.24.3
npmmongoose>= 9.0.0, < 9.9.29.9.2
VendorProductAffected versions (per CVE record)
Automatticmongoose< 6.13.11, >= 7.0.0, < 7.8.12, >= 8.0.0, < 8.24.3, >= 9.0.0, < 9.9.2

Severity scores

Scored byCVSSScoreVector
GitHub_M3.19.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
GitHub3.19.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Attack vector: network (remotely reachable)
  • Attack complexity: low
  • Privileges required: none (no login)
  • User interaction: none
  • Scope: unchanged

CVSS measures how bad a flaw is if exploited, not how likely exploitation is. Read it next to the exploitation data below.

Exploitation and urgency

  • 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.

Timeline

  • — CVE record published by GitHub_M
  • — GitHub-reviewed advisory GHSA-pcrw-h46h-c93h published (critical)
  • — CVE record last updated

Sources and references

Original sources first. Version and fix details should always be confirmed against the vendor or project advisory.

Vulnerability records

  1. GitHub Advisory GHSA-pcrw-h46h-c93h github.com
  2. CVE.org record CVE-2026-125120 cve.org
  3. NVD entry CVE-2026-125120 nvd.nist.gov

Other references from the CVE record and advisory

  1. github.com github.com
  2. github.com github.com
  3. github.com github.com
  4. github.com github.com
  5. github.com github.com
  6. github.com github.com
  7. github.com github.com
  8. github.com github.com
  9. github.com github.com

Critical npm advisories · Today’s Security Digest