Shellfeed logo Shellfeed

CVE-2026-125120 · CRITICAL (CVSS 9.8)

Summary: Mongoose: sanitizeFilter not applied on countDocuments

EPSS: 0.6% probability of exploitation in the next 30 days (percentile 47.5).

Details

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.

Severity

CRITICAL (CVSS 9.8) — vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected packages

  • npm mongoose [0 – 6.13.11]
  • npm mongoose [7.0.0 – 7.8.12]
  • npm mongoose [8.0.0 – 8.24.3]
  • npm mongoose [9.0.0 – 9.9.2]
  • GIT github.com/automattic/mongoose [0 – 60333ee82b9018265d000346943ee45f1a9052a9] [9b1ff1fe2ae42c985b31a57a084462a07619a546 – 3558f100ca428de6cd0cb1a94b39256ec78cace3] [582156858db3ca7fbaa8950dc997e0d9e8117b21 – bd28eef52ed8c08bb434b313ffdecf0373f9612d] [93c780b6e1c24a6b4ab42c14e64a2500da87a54b – f4f3750431e6e1a446a185ccbdab4b93076aa6d2]

References

Posts about CVE-2026-125120