Skip to content
Critical

CVE-2026-125120Mongoose Vulnerability

Mongoose: sanitizeFilter not applied on countDocuments

Published Nov 9, 2026 · Updated Nov 11, 2026 · Also known as EUVD-2026-120503, GHSA-pcrw-h46h-c93h

Key Facts

Patch in the next maintenance window
  • CVE-2026-125120 is a critical-severity vulnerability (CVSS 9.8 v3.1) affecting Mongoose (npm).
  • It is not listed in any known-exploited vulnerabilities catalog. No public exploit code is known.
  • EPSS estimates a 0.6% probability of exploitation in the next 30 days.
  • Fixed versions are available, including Mongoose 6.12.2-tuxcare.6, Mongoose 6.13.11, Mongoose 7.8.12.
  • Brandefense priority: patch in the next maintenance window, because of its high severity, although no exploitation is known.

Scores

CVSS v3.1

9.8

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

EPSS (30-day exploit likelihood)

0.6%

Higher than 47.4% of all scored CVEs

Exploit maturity

None known

ATLAS score

33/100

Publication score, see How it works

Exploitation Verdict

KEV listed

Not listed

Federal due date

None

No federal due date

Ransomware use

Not reported

Attributed actors

None named

Exploit & Defence Guidance

Exploit maturity

None known

Public exploit code

0

Proof-of-concept links

In-the-wild evidence

0

Reports of active use

Description

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

Workarounds

Middleware:

mongoose.plugin(function() {
  schema.pre('countDocuments', function() {
    // This will always apply `sanitizeFilter` on `countDocuments`
    mongoose.sanitizeFilter(this.getFilter());
  });
});

Affected Products

3 affected entries in total
ProductAffected versionsFixed in
Mongoosenpm>= 9.0.0, >= 9.0.0,9.9.2

Patched Releases

Mongoose

6.12.2-tuxcare.6, 6.13.11, 7.8.12, 8.24.3, 9.9.2

Timeline

  1. Publicly disclosed

    Nov 9, 2026

  2. Last updated

    Nov 11, 2026

Weakness Type

  • CWE-943 Improper Neutralization of Special Elements in Data Query Logic

FAQ

Common Questions.

Is CVE-2026-125120 On Your Attack Surface?

Brandefense matches it against the products discovered on your perimeter and opens a finding the day a CVE like this is listed.

Request A Demo

Figures as of Nov 30, 2026. Compiled by Brandefense technologies from public vulnerability catalogs; scoring as described in How it works.

To report an error, contact Brandefense.