Live threats

All CVEs / Automattic

CVE-2026-125120Automattic mongoose

Query Operator Injection in Mongoose countDocuments()

Critical 9.8 No auth needed

Priority
75
CVSS 3.1
9.8
EPSS
—
Auth required
No
Published
Nov 9, 2026
Updated
Nov 13, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-943
SSVC (CISA)
Exploitation: none · Automatable: no · Technical impact: total
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

What happens

Mongoose fails to apply the configured sanitizeFilter defense in the countDocuments() function, allowing query operator injection. An attacker can send malicious filter values to process operators instead of literal values, causing the count to include unintended documents and potentially undermining authorization logic.

AI-generated summary (Claude) based on NVD and CISA data. Not reviewed yet: check the details in the vendor advisory.

Show the original NVD text

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.

Source text, unmodified. NVD.

What to do

Patch available · fixed versions: 6.13.11, 7.8.12, 8.24.3, 9.9.2

Update Mongoose to version 6.13.11, 7.8.12, 8.24.3, or 9.9.2 depending on your version branch.

Vendor advisory · github.com ↗

AI-generated from public data; not reviewed.

  1. Apply the vendor's security update for mongoose.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
npm mongoose < 6.13.11 6.13.11 npm install mongoose@6.13.11
npm mongoose ≥ 7.0.0 < 7.8.12 7.8.12 npm install mongoose@7.8.12
npm mongoose ≥ 8.0.0 < 8.24.3 8.24.3 npm install mongoose@8.24.3
npm mongoose ≥ 9.0.0 < 9.9.2 9.9.2 npm install mongoose@9.9.2

Per OSV / GitHub Advisories (GHSA-pcrw-h46h-c93h). Check the version in your lockfile before upgrading.

Affected products

As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.

Official sources

References

Links published by the sources. Open them with care.