{"id":"CVE-2026-42334","state":"PUBLISHED","title":"Mongoose: Improper Sanitization of $nor in sanitizeFilter May Allow NoSQL Injection","description":"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.","publishedAt":"2026-05-14T18:03:43.196Z","updatedAt":"2026-05-14T18:18:06.935Z","severity":{"score":7.5,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","source":"GitHub_M"},"assigner":"GitHub_M","products":["Automattic mongoose"],"affected":[{"vendor":"Automattic","product":"mongoose","versions":[{"version":"< 6.13.9","status":"affected"},{"version":">= 7.0.0, <= 7.8.8","status":"affected"},{"version":">= 8.0.0, <= 8.22.0","status":"affected"},{"version":">= 9.0.0, <= 9.1.5","status":"affected"}]}],"references":["https://github.com/Automattic/mongoose/security/advisories/GHSA-wpg9-53fq-2r8h"],"weaknesses":["CWE-74"],"ingestedAt":"2026-10-29T20:11:57.932Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/42xxx/CVE-2026-42334.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-42334","state":"PUBLISHED","datePublished":"2026-05-14T18:03:43.196Z","dateUpdated":"2026-05-14T18:18:06.935Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2026-04-26T13:26:14.514Z"},"containers":{"cna":{"title":"Mongoose: Improper Sanitization of $nor in sanitizeFilter May Allow NoSQL Injection","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"Automattic","product":"mongoose","versions":[{"version":"< 6.13.9","status":"affected"},{"version":">= 7.0.0, <= 7.8.8","status":"affected"},{"version":">= 8.0.0, <= 8.22.0","status":"affected"},{"version":">= 9.0.0, <= 9.1.5","status":"affected"}]}],"references":[{"url":"https://github.com/Automattic/mongoose/security/advisories/GHSA-wpg9-53fq-2r8h","name":"https://github.com/Automattic/mongoose/security/advisories/GHSA-wpg9-53fq-2r8h","tags":["x_refsource_CONFIRM"]}],"metrics":[{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"NONE","baseScore":7.5,"baseSeverity":"HIGH","confidentialityImpact":"HIGH","integrityImpact":"NONE","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-74","lang":"en","description":"CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2026-05-14T18:03:43.196Z"},"source":{"advisory":"GHSA-wpg9-53fq-2r8h","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-05-14T18:17:58.426797Z","id":"CVE-2026-42334","options":[{"Exploitation":"none"},{"Automatable":"yes"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-05-14T18:18:06.935Z"}}]}}}