{"schemaVersion":4,"id":"CVE-2026-142595","aliases":["GHSA-25v4-hrwm-qj9f"],"status":"published","duplicateOf":null,"title":"Mongoose: `sanitizeFilter` bypass via MongoDB internal top-level query operators such as `$_internalSchemaXor`","description":"Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment. From 6.0.0 until 6.13.13, 7.8.14, 8.24.10, and 9.12.2, Mongoose's sanitizeFilter rejects only a small named set of top-level operators and does not recursively inspect undocumented operators such as $_internalSchemaXor and $_internalSchemaCond. Applications that pass attacker-controlled filter keys to queries while relying on sanitizeFilter can therefore accept nested selectors such as $ne or $regex, allowing authentication bypass, disclosure of protected values through boolean queries, or unintended updates and deletions. Applications that construct filters from individual primitive values are not affected by this bypass. This issue is fixed in versions 6.13.13, 7.8.14, 8.24.10, and 9.12.2.","dates":{"published":"2026-12-02T21:47:03.928Z","modified":"2026-12-03T16:42:36.259Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":6.5,"severity":"medium","version":"3.1","versionLabel":"v3.1","source":"CVE.org","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":6.5,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":6.5,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Npm","score":6.5,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N","exploitability":5.6,"impact":7,"computed":true}]},"epss":{"probability":0.00835,"percentile":0.58987,"severity":"low","asOf":"2026-12-04T00:00:00.000Z","change":{"pp":null,"baselineDate":null,"baselineScore":null},"history":[{"date":"2026-12-03T00:00:00.000Z","score":0.00562,"percentile":null},{"date":"2026-12-04T00:00:00.000Z","score":0.00835,"percentile":0.58987}],"last30":[{"date":"2026-12-03T00:00:00.000Z","score":0.00562,"percentile":null},{"date":"2026-12-04T00:00:00.000Z","score":0.00835,"percentile":0.58987}]},"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.0.0, < 6.13.13","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"6.0.0","startInclusive":true,"end":"6.13.13","endInclusive":false}},{"text":"≥ 7.0.0, < 7.8.14","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"7.0.0","startInclusive":true,"end":"7.8.14","endInclusive":false}},{"text":"≥ 8.0.0, < 8.24.10","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"8.0.0","startInclusive":true,"end":"8.24.10","endInclusive":false}},{"text":"≥ 9.0.0, < 9.12.2","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"9.0.0","startInclusive":true,"end":"9.12.2","endInclusive":false}}],"versionsText":"≥ 6.0.0, < 6.13.13 | ≥ 7.0.0, < 7.8.14 | ≥ 8.0.0, < 8.24.10 | ≥ 9.0.0, < 9.12.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.13","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":null,"startInclusive":true,"end":"6.13.13","endInclusive":false}},{"text":"≥ 7.0.0, < 7.8.14","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"7.0.0","startInclusive":true,"end":"7.8.14","endInclusive":false}},{"text":"≥ 8.0.0, < 8.24.10","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"8.0.0","startInclusive":true,"end":"8.24.10","endInclusive":false}},{"text":"≥ 9.0.0, < 9.12.2","noFixRecorded":false,"fixedIn":null,"bounds":{"kind":"range","start":"9.0.0","startInclusive":true,"end":"9.12.2","endInclusive":false}}],"versionsText":"< 6.13.13 | ≥ 7.0.0, < 7.8.14 | ≥ 8.0.0, < 8.24.10 | ≥ 9.0.0, < 9.12.2","eol":null,"hubHref":null}],"affectedCount":2,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/Automattic/mongoose/security/advisories/GHSA-25v4-hrwm-qj9f","label":"github.com/Automattic/mongoose/security/advisories/GHSA-25v4-hrwm-qj9f","hostname":"github.com","tags":["X Refsource CONFIRM","WEB"]},{"url":"https://github.com/Automattic/mongoose/commit/34e76947cc8a9ceb916c233aec01aea060bc3dba","label":"github.com/Automattic/mongoose/commit/34e76947cc8a9ceb916c233aec01aea060bc3dba","hostname":"github.com","tags":["X Refsource MISC","WEB"]},{"url":"https://github.com/Automattic/mongoose/commit/3e5f4c8b30ef42db1ab9f2794dc77c95f21d3835","label":"github.com/Automattic/mongoose/commit/3e5f4c8b30ef42db1ab9f2794dc77c95f21d3835","hostname":"github.com","tags":["X Refsource MISC","WEB"]},{"url":"https://github.com/Automattic/mongoose/commit/4627d2fc572a943ee7afe26a1bcebe493dbd2508","label":"github.com/Automattic/mongoose/commit/4627d2fc572a943ee7afe26a1bcebe493dbd2508","hostname":"github.com","tags":["X Refsource MISC","WEB"]},{"url":"https://github.com/Automattic/mongoose/commit/c6a4c95f9b15d81a352f2934c91b64ece583c2db","label":"github.com/Automattic/mongoose/commit/c6a4c95f9b15d81a352f2934c91b64ece583c2db","hostname":"github.com","tags":["X Refsource MISC","WEB"]},{"url":"https://github.com/Automattic/mongoose/releases/tag/7.8.14","label":"github.com/Automattic/mongoose/releases/tag/7.8.14","hostname":"github.com","tags":["X Refsource MISC","WEB"]},{"url":"https://github.com/Automattic/mongoose/releases/tag/8.24.10","label":"github.com/Automattic/mongoose/releases/tag/8.24.10","hostname":"github.com","tags":["X Refsource MISC","WEB"]},{"url":"https://github.com/Automattic/mongoose/releases/tag/9.12.2","label":"github.com/Automattic/mongoose/releases/tag/9.12.2","hostname":"github.com","tags":["X Refsource MISC","WEB"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-142595","label":"nvd.nist.gov/vuln/detail/CVE-2026-142595","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-12-02T21:47:03.928Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2026-12-03T16:42:36.259Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"priority":{"label":"routine","tag":null,"reason":"Not severe (CVSS 6.5, network access); no exploitation reported by the 5 checked sources","nextStep":"Fix in the normal cadence","rank":[0,0,0,0,1,65],"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.00835,"stale":false,"promoted":null},{"type":"cvss","source":"cve.org","date":"2026-12-03T16:42:36.259Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":6.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N","version":"3.1","headline":true},{"type":"cvss","source":"nvd","date":"2026-12-03T16:42:36.259Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":6.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N","version":"3.1"},{"type":"cvss","source":"osv_npm","date":"2026-12-03T16:42:36.259Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"score":6.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N","version":"3.1"},{"type":"adp","source":"cisa-adp","date":"2026-12-03T16:42:28.142Z","status":"valid","statusDate":null,"statusSource":null,"disputes":[],"exploitation":"poc"}],"epss":{"value":0.00835,"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.233Z","stale":false,"partial":false}}