# CVE-2026-125120: Mongoose: sanitizeFilter not applied on countDocuments

- Severity: Critical 9.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.75%, higher than 56% of CVEs (2026-12-01)
- Published: 2026-11-09T22:36:16.207Z
- Modified: 2026-11-27T06:55:45.157Z
- Also known as: GHSA-pcrw-h46h-c93h, BIT-MONGOOSE-2026-125120
- Weaknesses: CWE-943
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- Automattic mongoose: < 6.13.11; >= 7.0.0, < 7.8.12; >= 8.0.0, < 8.24.3; >= 9.0.0, < 9.9.2
- mongoose (npm): before 6.13.11; from 7.0.0 before 7.8.12; from 8.0.0 before 8.24.3; from 9.0.0 before 9.9.2
- mongoose (Bitnami): before 6.13.11; from 7.0.0 before 7.8.12; from 8.0.0 before 8.24.3; from 9.0.0 before 9.9.2

## Every score

- GitHub_M: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Bitnami Vulnerability Database: rating Critical

## References

- <https://github.com/Automattic/mongoose/security/advisories/GHSA-pcrw-h46h-c93h> (web)
- <https://github.com/Automattic/mongoose/commit/7e912af3fac52cb0eea4cd71e24d65318916831a> (web)
- <https://github.com/Automattic/mongoose/commit/8b10d5760bb181f5bf5d01495cde161c8aed0557> (web)
- <https://github.com/Automattic/mongoose/commit/b1df045aab076b740fdaec14a15a44c694b85b7d> (web)
- <https://github.com/Automattic/mongoose/commit/b5003d3915db1cf9209c38a4b93cf3a92cddd710> (web)
- <https://github.com/Automattic/mongoose/releases/tag/6.13.11> (web)
- <https://github.com/Automattic/mongoose/releases/tag/7.8.12> (web)
- <https://github.com/Automattic/mongoose/releases/tag/8.24.3> (web)
- <https://github.com/Automattic/mongoose/releases/tag/9.9.2> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-125120> (advisory, web)
- <https://github.com/Automattic/mongoose> (package)

## Sources

- CVE List: [CVE-2026-125120](https://www.cve.org/CVERecord?id=CVE-2026-125120), CVE Terms of Use, modified 2026-11-13
- GitHub Advisory Database: [GHSA-pcrw-h46h-c93h](https://github.com/advisories/GHSA-pcrw-h46h-c93h), CC-BY-4.0, modified 2026-11-27
- NVD: [CVE-2026-125120](https://nvd.nist.gov/vuln/detail/CVE-2026-125120), Public domain, modified 2026-11-13
- Bitnami Vulnerability Database: [BIT-MONGOOSE-2026-125120](https://osv.dev/vulnerability/BIT-MONGOOSE-2026-125120), Apache-2.0, modified 2026-11-27

---

Page: https://cve.day/CVE-2026-125120 · Whole record: https://cve.day/CVE-2026-125120.json · Rebuilt by cve.day 2026-11-27T07:07:28.781Z
