NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
CRITICAL severity

CVE-2026-125120 — mongoose

CRITICALFix: Automattic/mongoose@7e912af

CVE-2026-125120 is a critical-severity (CVSS 9.8) CWE-943 vulnerability in mongoose. A fix is available for mongoose — see the affected versions and patch details below.

Mongoose: sanitizeFilter not applied on countDocuments

Also known asGHSA-pcrw-h46h-c93h
Published
Updated
Affected
4 pkgs
Patched
4 / 4
Exploits
None indexed
Exploitation data as of Nov 10, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
0.6%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs47th percentile — riskier than 47% of all scored CVEsHighest risk

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

Real-World Exposure

4 pkgs affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

21Kother npm packages depend on this — each one inherits the vulnerability until it's patched upstream
mongoosenpm
8.9Mdownloads / week

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.

Affected Packages

4 total 4 fixed
EcosystemPackageVulnerable rangeFix
📦npmmongooseall versions6.13.11npm install mongoose@6.13.11
📦npmmongoose≥ 7.0.0&&< 7.8.127.8.12npm install mongoose@7.8.12
📦npmmongoose≥ 8.0.0&&< 8.24.38.24.3npm install mongoose@8.24.3
📦npmmongoose≥ 9.0.0&&< 9.9.29.9.2npm install mongoose@9.9.2

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for mongoose, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update mongoose to 6.13.11 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-125120 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

Frequently Asked Questions

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
O3 Security · Impact-Aware SCA

Is CVE-2026-125120 in your dependencies?

Find it across npm, including transitive dependencies.

CVE-2026-125120: mongoose — Fixed in 6.13.11