Back to list

Mongoose's Improper Sanitization of $nor in sanitizeFilter May Allow NoSQL Injection — CVE-2026-42334

GHSA · GitHub · CVE-2026-42334

ID
CVE-2026-42334
Date
Updated
Activity
Source
GHSA
Vendor
GitHub
Threat
high
CVSS
7.5

Summary

### Impact This 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…

Product

npm: mongoose

What to do

General, cautious steps (verify details in the official source):

  • Prioritize patching or mitigation immediately (treat as actively risky).
  • Identify affected product versions in your inventory and verify whether you are impacted.
  • Apply vendor patches/updates or recommended mitigations as soon as available.
  • Read the official advisory for exact affected versions and remediation steps.

Official advisory

Related advisories