{"schemaVersion":4,"id":"CVE-2026-125120","aliases":["GHSA-pcrw-h46h-c93h","BIT-mongoose-2026-125120"],"status":"published","duplicateOf":null,"title":"Mongoose: sanitizeFilter not applied on countDocuments","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.","dates":{"published":"2026-11-09T22:36:16.207Z","modified":"2026-11-13T13:40:53.316Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":9.8,"severity":"critical","version":"3.1","versionLabel":"v3.1","source":"CVE.org","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Npm","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":10,"impact":9.8,"computed":true}]},"epss":{"probability":0.00749,"percentile":0.56302,"severity":"low","asOf":"2026-12-04T00:00:00.000Z","change":{"pp":null,"baselineDate":null,"baselineScore":null},"history":[{"date":"2026-11-10T00:00:00.000Z","score":0.00566,"percentile":null},{"date":"2026-11-11T00:00:00.000Z","score":0.00566,"percentile":null},{"date":"2026-11-12T00:00:00.000Z","score":0.00566,"percentile":null},{"date":"2026-11-13T00:00:00.000Z","score":0.00566,"percentile":null},{"date":"2026-11-14T00:00:00.000Z","score":0.00566,"percentile":null},{"date":"2026-11-15T00:00:00.000Z","score":0.00566,"percentile":null},{"date":"2026-11-16T00:00:00.000Z","score":0.00566,"percentile":null},{"date":"2026-11-17T00:00:00.000Z","score":0.00566,"percentile":null},{"date":"2026-11-18T00:00:00.000Z","score":0.00566,"percentile":null},{"date":"2026-11-19T00:00:00.000Z","score":0.00566,"percentile":null},{"date":"2026-11-20T00:00:00.000Z","score":0.00566,"percentile":null},{"date":"2026-11-21T00:00:00.000Z","score":0.00566,"percentile":null},{"date":"2026-11-22T00:00:00.000Z","score":0.00566,"percentile":null},{"date":"2026-11-23T00:00:00.000Z","score":0.00566,"percentile":null},{"date":"2026-11-24T00:00:00.000Z","score":0.00566,"percentile":null},{"date":"2026-11-25T00:00:00.000Z","score":0.00937,"percentile":null},{"date":"2026-11-26T00:00:00.000Z","score":0.00937,"percentile":null},{"date":"2026-11-27T00:00:00.000Z","score":0.00937,"percentile":null},{"date":"2026-11-28T00:00:00.000Z","score":0.00937,"percentile":null},{"date":"2026-11-29T00:00:00.000Z","score":0.00937,"percentile":null},{"date":"2026-11-30T00:00:00.000Z","score":0.00937,"percentile":null},{"date":"2026-12-01T00:00:00.000Z","score":0.00749,"percentile":null},{"date":"2026-12-02T00:00:00.000Z","score":0.00749,"percentile":null},{"date":"2026-12-03T00:00:00.000Z","score":0.00749,"percentile":null},{"date":"2026-12-04T00:00:00.000Z","score":0.00749,"percentile":0.56302}],"last30":[{"date":"2026-11-10T00:00:00.000Z","score":0.00566,"percentile":null},{"date":"2026-11-11T00:00:00.000Z","score":0.00566,"percentile":null},{"date":"2026-11-12T00:00:00.000Z","score":0.00566,"percentile":null},{"date":"2026-11-13T00:00:00.000Z","score":0.00566,"percentile":null},{"date":"2026-11-14T00:00:00.000Z","score":0.00566,"percentile":null},{"date":"2026-11-15T00:00:00.000Z","score":0.00566,"percentile":null},{"date":"2026-11-16T00:00:00.000Z","score":0.00566,"percentile":null},{"date":"2026-11-17T00:00:00.000Z","score":0.00566,"percentile":null},{"date":"2026-11-18T00:00:00.000Z","score":0.00566,"percentile":null},{"date":"2026-11-19T00:00:00.000Z","score":0.00566,"percentile":null},{"date":"2026-11-20T00:00:00.000Z","score":0.00566,"percentile":null},{"date":"2026-11-21T00:00:00.000Z","score":0.00566,"percentile":null},{"date":"2026-11-22T00:00:00.000Z","score":0.00566,"percentile":null},{"date":"2026-11-23T00:00:00.000Z","score":0.00566,"percentile":null},{"date":"2026-11-24T00:00:00.000Z","score":0.00566,"percentile":null},{"date":"2026-11-25T00:00:00.000Z","score":0.00937,"percentile":null},{"date":"2026-11-26T00:00:00.000Z","score":0.00937,"percentile":null},{"date":"2026-11-27T00:00:00.000Z","score":0.00937,"percentile":null},{"date":"2026-11-28T00:00:00.000Z","score":0.00937,"percentile":null},{"date":"2026-11-29T00:00:00.000Z","score":0.00937,"percentile":null},{"date":"2026-11-30T00:00:00.000Z","score":0.00937,"percentile":null},{"date":"2026-12-01T00:00:00.000Z","score":0.00749,"percentile":null},{"date":"2026-12-02T00:00:00.000Z","score":0.00749,"percentile":null},{"date":"2026-12-03T00:00:00.000Z","score":0.00749,"percentile":null},{"date":"2026-12-04T00:00:00.000Z","score":0.00749,"percentile":0.56302}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-943","name":"Improper Neutralization of Special Elements in Data Query Logic","description":"The product generates a query intended to access or manipulate data in a data store such as a database, but it does not neutralize or incorrectly neutralizes special elements that can modify the intended logic of the query.","type":"weakness","status":"Incomplete","abstraction":"Class","likelihoodOfExploit":null,"url":"https://cwe.mitre.org/data/definitions/943.html"}],"affected":[{"vendor":"automattic","product":"mongoose","name":"mongoose","label":"mongoose","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 6.13.11","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":null,"startInclusive":true,"end":"6.13.11","endInclusive":false}},{"text":"≥ 7.0.0, < 7.8.12","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"7.0.0","startInclusive":true,"end":"7.8.12","endInclusive":false}},{"text":"≥ 8.0.0, < 8.24.3","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"8.0.0","startInclusive":true,"end":"8.24.3","endInclusive":false}},{"text":"≥ 9.0.0, < 9.9.2","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"9.0.0","startInclusive":true,"end":"9.9.2","endInclusive":false}}],"versionsText":"< 6.13.11 | ≥ 7.0.0, < 7.8.12 | ≥ 8.0.0, < 8.24.3 | ≥ 9.0.0, < 9.9.2","eol":null,"hubHref":"/vendor/automattic/mongoose"},{"vendor":"Npm","product":"mongoose","name":"mongoose","label":"mongoose","ecosystem":"Npm","cpePart":null,"purl":"pkg:npm/mongoose","purlType":"npm","versions":[{"text":"< 6.13.11","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":null,"startInclusive":true,"end":"6.13.11","endInclusive":false}},{"text":"≥ 7.0.0, < 7.8.12","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"7.0.0","startInclusive":true,"end":"7.8.12","endInclusive":false}},{"text":"≥ 8.0.0, < 8.24.3","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"8.0.0","startInclusive":true,"end":"8.24.3","endInclusive":false}},{"text":"≥ 9.0.0, < 9.9.2","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"9.0.0","startInclusive":true,"end":"9.9.2","endInclusive":false}}],"versionsText":"< 6.13.11 | ≥ 7.0.0, < 7.8.12 | ≥ 8.0.0, < 8.24.3 | ≥ 9.0.0, < 9.9.2","eol":null,"hubHref":null}],"affectedCount":2,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/Automattic/mongoose/security/advisories/GHSA-pcrw-h46h-c93h","label":"github.com/Automattic/mongoose/security/advisories/GHSA-pcrw-h46h-c93h","hostname":"github.com","tags":["X Refsource CONFIRM","WEB"]},{"url":"https://github.com/Automattic/mongoose/commit/7e912af3fac52cb0eea4cd71e24d65318916831a","label":"github.com/Automattic/mongoose/commit/7e912af3fac52cb0eea4cd71e24d65318916831a","hostname":"github.com","tags":["X Refsource MISC","WEB"]},{"url":"https://github.com/Automattic/mongoose/commit/8b10d5760bb181f5bf5d01495cde161c8aed0557","label":"github.com/Automattic/mongoose/commit/8b10d5760bb181f5bf5d01495cde161c8aed0557","hostname":"github.com","tags":["X Refsource MISC","WEB"]},{"url":"https://github.com/Automattic/mongoose/commit/b1df045aab076b740fdaec14a15a44c694b85b7d","label":"github.com/Automattic/mongoose/commit/b1df045aab076b740fdaec14a15a44c694b85b7d","hostname":"github.com","tags":["X Refsource MISC","WEB"]},{"url":"https://github.com/Automattic/mongoose/commit/b5003d3915db1cf9209c38a4b93cf3a92cddd710","label":"github.com/Automattic/mongoose/commit/b5003d3915db1cf9209c38a4b93cf3a92cddd710","hostname":"github.com","tags":["X Refsource MISC","WEB"]},{"url":"https://github.com/Automattic/mongoose/releases/tag/6.13.11","label":"github.com/Automattic/mongoose/releases/tag/6.13.11","hostname":"github.com","tags":["X Refsource MISC","WEB"]},{"url":"https://github.com/Automattic/mongoose/releases/tag/7.8.12","label":"github.com/Automattic/mongoose/releases/tag/7.8.12","hostname":"github.com","tags":["X Refsource MISC","WEB"]},{"url":"https://github.com/Automattic/mongoose/releases/tag/8.24.3","label":"github.com/Automattic/mongoose/releases/tag/8.24.3","hostname":"github.com","tags":["X Refsource MISC","WEB"]},{"url":"https://github.com/Automattic/mongoose/releases/tag/9.9.2","label":"github.com/Automattic/mongoose/releases/tag/9.9.2","hostname":"github.com","tags":["X Refsource MISC","WEB"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-125120","label":"nvd.nist.gov/vuln/detail/CVE-2026-125120","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/Automattic/mongoose","label":"github.com/Automattic/mongoose","hostname":"github.com","tags":["PACKAGE"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2026-11-09T22:36:16.207Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2026-11-13T13:40:53.316Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"priority":{"label":"prioritise","tag":"severe","reason":"Severe, CVSS 9.8 (CVE.org); no exploitation reported by the 5 checked sources; EPSS 1% (FIRST, 04-12-2026)","nextStep":"Check applicability: affected before 6.13.11, 7.8.12, 8.24.3, 9.9.2 (CNA); fix release not confirmed","rank":[0,0,0,0,1,98],"checkedSources":["cisa","enisa","circl","shadowserver","cisa-adp"],"evidence":[{"type":"epss","source":"FIRST","date":"2026-12-04T00:00:00.000Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"value":0.00749,"stale":false,"promoted":null},{"type":"cvss","source":"cve.org","date":"2026-11-13T13:40:53.316Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1","headline":true},{"type":"cvss","source":"nvd","date":"2026-11-13T13:40:53.316Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},{"type":"cvss","source":"osv_npm","date":"2026-11-13T13:40:53.316Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},{"type":"adp","source":"cisa-adp","date":"2026-11-13T13:38:54.842Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"exploitation":"none"}],"epss":{"value":0.00749,"date":"2026-12-04T00:00:00.000Z","stale":false,"promoted":null},"sources":[{"id":"cisa","lastSuccessfulSync":"2026-12-05T10:02:10.250Z","state":"fresh"},{"id":"enisa","lastSuccessfulSync":"2026-12-05T10:02:10.837Z","state":"fresh"},{"id":"circl","lastSuccessfulSync":"2026-12-05T10:02:11.033Z","state":"fresh"},{"id":"shadowserver","lastSuccessfulSync":null,"state":"unavailable"},{"id":"cisa-adp","lastSuccessfulSync":"2026-12-05T10:01:03.214Z","state":"fresh"},{"id":"epss","lastSuccessfulSync":"2026-12-05T10:02:08.667Z","state":"fresh"},{"id":"osv","lastSuccessfulSync":"2026-12-05T10:02:07.694Z","state":"fresh"}],"feedEvent":null},"meta":{"dataAsOf":"2026-12-05T10:11:08.863Z","stale":false,"partial":false}}