Skip to content
Fencer Intel
critical 9.8

CVE-2026-125120 json

Mongoose: sanitizeFilter not applied on countDocuments

published 9d ago modified yesterday also EUVD-2026-120503 , GHSA-pcrw-h46h-c93h

cvss
9.8
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.6%
EPSS 0.6% chance of exploitation in 30 days, percentile 47%
public exploits
0
none known

Summary

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.

Patch / fix

Is CVE-2026-125120 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

Exploit prediction

0.57% chance of exploitation in the next 30 days, higher than 47% of all scored CVEs (FIRST EPSS, 2026-11-11).

CVSS scores

assigned by version score vector
CNA 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
GitHub 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected packages

ecosystem package affected fixed in
npm mongoose
<6.13.11
>=7.0.0, <7.8.12
>=8.0.0, <8.24.3
>=9.0.0, <9.9.2
6.13.11
7.8.12
8.24.3
9.9.2

Affected products

  • Automattic mongoose

Classification

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

References

Sources

Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.

The maintainers of Automattic/mongoose published their own advisory on GitHub. Reviewed sources take precedence over it.