{"id":"CVE-2026-125120","published":"2026-11-09T23:17:22Z","modified":"2026-11-13T14:17:52Z","title":"Mongoose: sanitizeFilter not applied on countDocuments","vendor":"Automattic","product":"mongoose","tier":"core","eol":null,"affectedVersions":[{"vendor":"Automattic","product":"mongoose","versions":["< 6.13.11",">= 7.0.0, < 7.8.12",">= 8.0.0, < 8.24.3",">= 9.0.0, < 9.9.2"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-11-13T13:38:54.842323Z","from":"CISA ADP","provenance":"source"},"nvdStatus":"Awaiting Analysis","description":{"text":"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.","provenance":"source","from":"NVD"},"summary":{"text":"In Mongoose, the countDocuments() method fails to apply the sanitizeFilter query selector injection defense, so a configured sanitizeFilter has no effect on that method. An attacker who can supply filter values to an application that calls countDocuments() with them, without needing any credentials, can get query operator objects treated as operators rather than literal values, which can inflate the count and undermine authorization or logic that depends on it.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-21T03:47:13Z"},"cvss":{"score":9.8,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"NVD"},"epss":{"score":0.00566,"percentile":0.47851,"date":"2026-11-21","provenance":"source"},"kev":null,"vulncheckKev":null,"exploited":false,"otx":{"pulseCount":8,"pulses":[{"name":"Known_Cve | Nov 18, 2026 | Part 1/3","url":"https://otx.alienvault.com/pulse/6afc69ad6afed7d92ec6e7f4","created":"2026-11-17"},{"name":"Known_Cve | Nov 17, 2026 | Part 1/3","url":"https://otx.alienvault.com/pulse/6afb1818f367d75558a584e0","created":"2026-11-16"},{"name":"Known_Cve | Nov 16, 2026 | Part 1/3","url":"https://otx.alienvault.com/pulse/6af9c64fca9a61b97e66b5ae","created":"2026-11-15"},{"name":"Known_Cve | Nov 15, 2026 | Part 1/3","url":"https://otx.alienvault.com/pulse/6af87576edc653ae620f3d8a","created":"2026-11-14"},{"name":"Known_Cve | Nov 14, 2026 | Part 2/3","url":"https://otx.alienvault.com/pulse/6af723ea69848486a62d3d64","created":"2026-11-13"},{"name":"Known_Cve | Nov 13, 2026 | Part 2/3","url":"https://otx.alienvault.com/pulse/6af5d2c4a92649ec66b2da1d","created":"2026-11-12"},{"name":"Known_Cve | Nov 12, 2026 | Part 2/3","url":"https://otx.alienvault.com/pulse/6af4817ce56186812bf7ac16","created":"2026-11-11"},{"name":"Known_Cve | Nov 11, 2026 | Part 2/3","url":"https://otx.alienvault.com/pulse/6af32fa1e2a2e6e4c806be21","created":"2026-11-10"}],"provenance":"machine"},"cwes":[{"id":"CWE-943","name":"Improper Neutralization of Special Elements in Data Query Logic"}],"references":[{"url":"https://github.com/Automattic/mongoose/commit/7e912af3fac52cb0eea4cd71e24d65318916831a","tags":["x_refsource_MISC"]},{"url":"https://github.com/Automattic/mongoose/commit/8b10d5760bb181f5bf5d01495cde161c8aed0557","tags":["x_refsource_MISC"]},{"url":"https://github.com/Automattic/mongoose/commit/b1df045aab076b740fdaec14a15a44c694b85b7d","tags":["x_refsource_MISC"]},{"url":"https://github.com/Automattic/mongoose/commit/b5003d3915db1cf9209c38a4b93cf3a92cddd710","tags":["x_refsource_MISC"]},{"url":"https://github.com/Automattic/mongoose/releases/tag/6.13.11","tags":["x_refsource_MISC"]},{"url":"https://github.com/Automattic/mongoose/releases/tag/7.8.12","tags":["x_refsource_MISC"]},{"url":"https://github.com/Automattic/mongoose/releases/tag/8.24.3","tags":["x_refsource_MISC"]},{"url":"https://github.com/Automattic/mongoose/releases/tag/9.9.2","tags":["x_refsource_MISC"]},{"url":"https://github.com/Automattic/mongoose/security/advisories/GHSA-pcrw-h46h-c93h","tags":["x_refsource_CONFIRM"]}],"techniques":[],"reports":[],"affected":[{"ecosystem":"npm","package":"mongoose","vulnerableRanges":["<6.13.11",">=7.0.0, <7.8.12",">=8.0.0, <8.24.3",">=9.0.0, <9.9.2"],"patched":["6.13.11","7.8.12","8.24.3","9.9.2"],"from":["GHSA-pcrw-h46h-c93h"],"provenance":"source"}],"advisories":[{"id":"GHSA-pcrw-h46h-c93h","url":"https://github.com/advisories/GHSA-pcrw-h46h-c93h","severity":"CRITICAL","ecosystem":"npm","package":"mongoose","vulnerableRanges":["<6.13.11"],"patched":["6.13.11"],"provenance":"source","from":"GHSA"},{"id":"GHSA-pcrw-h46h-c93h","url":"https://github.com/advisories/GHSA-pcrw-h46h-c93h","severity":"CRITICAL","ecosystem":"npm","package":"mongoose","vulnerableRanges":[">=7.0.0, <7.8.12"],"patched":["7.8.12"],"provenance":"source","from":"GHSA"},{"id":"GHSA-pcrw-h46h-c93h","url":"https://github.com/advisories/GHSA-pcrw-h46h-c93h","severity":"CRITICAL","ecosystem":"npm","package":"mongoose","vulnerableRanges":[">=8.0.0, <8.24.3"],"patched":["8.24.3"],"provenance":"source","from":"GHSA"},{"id":"GHSA-pcrw-h46h-c93h","url":"https://github.com/advisories/GHSA-pcrw-h46h-c93h","severity":"CRITICAL","ecosystem":"npm","package":"mongoose","vulnerableRanges":[">=9.0.0, <9.9.2"],"patched":["9.9.2"],"provenance":"source","from":"GHSA"}],"euvd":{"id":"EUVD-2026-120503","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-120503","exploited":false,"exploitedSince":null,"provenance":"source"},"exploits":[],"exploitSources":null,"exploitRefs":[],"flow":[],"timeline":[{"date":"2026-11-09","kind":"published","label":"Published (NVD)","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-125120","provenance":"source"}],"speed":{"daysToPublicExploit":null,"firstExploitFrom":null,"daysToKev":null},"priority":{"score":18.6,"factors":[{"name":"In a KEV catalog","points":0.0,"detail":"not listed"},{"name":"Recent KEV listing","points":0.0,"detail":"not listed"},{"name":"Known ransomware use","points":0.0,"detail":"not known"},{"name":"EPSS percentile","points":9.57,"detail":"percentile 0.4785"},{"name":"Named in threat reports","points":0.0,"detail":"0 reports"},{"name":"Public exploit code","points":0.0,"detail":"none found"},{"name":"Mentioned in OTX pulses","points":2.17,"detail":"8 pulses"},{"name":"CVSS severity","points":6.86,"detail":"base score 9.8"},{"name":"End-of-life product","points":0.0,"detail":"supported or unknown"}]},"lineage":{"packageHistory":[{"cve":"CVE-2025-23061","published":"2025-01-15","fixed":"8.9.5","kev":false},{"cve":"CVE-2026-42334","published":"2026-05-14","fixed":"9.1.6","kev":false},{"cve":"CVE-2026-73562","published":"2026-08-13","fixed":"9.7.2","kev":false,"link":{"from":"CVE-2026-73562","to":"CVE-2026-125120","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:mongoose","fromFixed":"6.13.10","toFixed":"6.13.11","daysApart":88},{"kind":"version-step","provenance":"source","package":"npm:mongoose","fromFixed":"7.8.10","toFixed":"7.8.12","daysApart":88}]}},{"cve":"CVE-2026-125120","published":"2026-11-09","fixed":"9.9.2","kev":false},{"cve":"CVE-2026-125116","published":"2026-11-09","fixed":"9.11.4","kev":false},{"cve":"CVE-2026-125117","published":"2026-11-09","fixed":"9.11.4","kev":false},{"cve":"CVE-2026-125118","published":"2026-11-09","fixed":"9.11.4","kev":false}],"package":"npm:mongoose"}}