{"id":"CVE-2026-42334","published":"2026-05-14T18:03:43Z","modified":"2026-05-14T18:18:06Z","title":"Mongoose: Improper Sanitization of $nor in sanitizeFilter May Allow NoSQL Injection","vendor":"Automattic","product":"mongoose","tier":"tail","description":{"text":"Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment. Prior to 6.13.9, 7.8.9, 8.22.1, and 9.1.6, a vulnerability allows bypassing Mongoose’s sanitizeFilter query sanitization mechanism via the $nor operator. When sanitizeFilter is enabled, Mongoose wraps query operators in $eq to neutralize them. However, prior to the fix, $nor was not included in the set of logical operators that are recursively sanitized. Because $nor accepts an array (like $and and $or), and arrays do not trigger hasDollarKeys(), malicious operators such as $ne, $gt, or $regex could be injected inside a $nor clause without being sanitized. This vulnerability is fixed in 6.13.9, 7.8.9, 8.22.1, and 9.1.6.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.5,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00274,"percentile":0.20253,"provenance":"source"},"cwes":[{"id":"CWE-74","name":"Improper Neutralization of Special Elements in Output Used by a Downstream Component"}],"references":[{"url":"https://github.com/Automattic/mongoose/security/advisories/GHSA-wpg9-53fq-2r8h","tags":["x_refsource_CONFIRM"]}],"priority":{"score":9.3,"factors":[{"name":"EPSS percentile","points":4.05},{"name":"CVSS severity","points":5.25}]},"vendorSlug":"automattic","affectedVersions":[{"vendor":"Automattic","product":"mongoose","versions":["< 6.13.9",">= 7.0.0, <= 7.8.8",">= 8.0.0, <= 8.22.0",">= 9.0.0, <= 9.1.5"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2026-05-14T18:17:58.426797Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"mongoose","vulnerableRanges":["<6.13.9",">=7.0.0, <7.8.9",">=8.0.0, <8.22.1",">=9.0.0, <9.1.6"],"patched":["6.13.9","7.8.9","8.22.1","9.1.6"],"from":["GHSA-wpg9-53fq-2r8h"],"provenance":"source"}],"summary":{"text":"The flaw is in Mongoose, the MongoDB object modeling tool from Automattic, specifically in its sanitizeFilter query sanitization mechanism, which fails to recursively sanitize the $nor logical operator. An attacker who can send query input to an application using Mongoose with sanitizeFilter enabled can inject operators such as $ne, $gt, or $regex inside a $nor clause, bypassing the sanitization, and no authentication, user interaction, or special configuration beyond sanitizeFilter being enabled is described as required.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:05:56Z"},"euvd":{"id":"EUVD-2026-30349","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2023-3696","published":"2023-07-17","fixed":"7.3.3","kev":false},{"cve":"CVE-2024-53900","published":"2024-12-02","fixed":"8.8.3","kev":false},{"cve":"CVE-2025-23061","published":"2025-01-15","fixed":"8.9.5","kev":false,"link":{"from":"CVE-2025-23061","to":"CVE-2026-42334","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:mongoose","fromFixed":"6.13.6","toFixed":"6.13.9","daysApart":484},{"kind":"version-step","provenance":"source","package":"npm:mongoose","fromFixed":"7.8.4","toFixed":"7.8.9","daysApart":484}]}},{"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-42334","to":"CVE-2026-73562","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:mongoose","fromFixed":"6.13.9","toFixed":"6.13.10","daysApart":91},{"kind":"version-step","provenance":"source","package":"npm:mongoose","fromFixed":"7.8.9","toFixed":"7.8.10","daysApart":91}]}},{"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}],"package":"npm:mongoose"}}