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

High 7.5 Published Updated

Attackers can bypass query sanitization via the $nor operator to inject malicious NoSQL queries, potentially reading or modifying data.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-42334?

CVE-2026-42334 is a high-severity SQL injection vulnerability in Automattic mongoose, published on 14 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

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

Weakness: CWE-74

Which versions are affected by CVE-2026-42334?

9 open source packages ship an affected version, including mongoose. It affects 1 product.

PackageAffectedFixed in
mongoose BitnamiAll versions6.13.9, 7.8.9, 8.22.1, 9.1.6
mongoose npmAll versions6.13.9
mongoose npmAll versions6.13.9
mongoose npmFrom 7.0.07.8.9
mongoose npmFrom 7.0.07.8.9
mongoose npmFrom 8.0.08.22.1
3 more packages
mongoose npmFrom 8.0.08.22.1
mongoose npmFrom 9.0.09.1.6
mongoose npmFrom 9.0.09.1.6

Products include Mongoosejs Mongoose.

How do I fix CVE-2026-42334?

Upgrade mongoose to a fixed version for your release line: 6.13.9, 7.8.9, 8.22.1 or 9.1.6.

Use parameterised queries everywhere and never build SQL by joining strings. Upgrade affected software first; a web application firewall only buys time. More about SQL injection.

Is CVE-2026-42334 being exploited?

There is no known exploitation of CVE-2026-42334 in the wild and no public exploit code.

Sources

Also known as BIT-mongoose-2026-42334, CLSA-2026-1783558972, GHSA-wpg9-53fq-2r8h, ROOT-APP-NPM-CVE-2026-42334.

Is CVE-2026-42334 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free