← Back to search

CVE-2026-125120

9.8 CRITICALpublic exploit available

Published 2026-11-09 · Updated 2026-11-09

AI risk analysis

Summary
Mongoose's countDocuments() function fails to sanitize attacker-controlled filter inputs when sanitizeFilter is enabled, allowing query operator injection. This lets attackers manipulate the count result by injecting operators like $gt or $ne as literal values, potentially bypassing authorization checks or business logic that relies on accurate document counts.
Exploitability
Exploitation requires an application to explicitly enable sanitizeFilter and pass unsanitized user input directly to countDocuments(); no authentication is needed if the endpoint is publicly exposed.
Blast radius
Successful exploitation could lead to unauthorized data access, privilege escalation via incorrect count-based authorization, or disruption of rate-limiting and quota enforcement mechanisms.
Detection
No reliable host or network indicator is derivable from the published description.
Prioritized remediation
Upgrade Mongoose to version 6.13.11, 7.8.12, 8.24.3, or 9.9.2 (or later patch for the respective major line) immediately.
injectionauth-bypassmongodbnodejs

Analysis generated locally by garnet-coder (no data left the box). AI-assisted — verify against primary sources before acting.

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

CVSS vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Weaknesses

CWE-943

Public exploit & PoC references

All references

Source data: NVD (nvd.nist.gov), public domain. Exploit-DB.ai adds local AI analysis for defensive use only.

Related CVEs

Related by shared AI tags and CWE weakness class. Browse the full archive.