CVE-2026-42334: CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') in Automattic mongoose
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.
AI Analysis
Technical Summary
Mongoose, a MongoDB object modeling tool, had a vulnerability (CVE-2026-42334) where its sanitizeFilter mechanism failed to sanitize the $nor logical operator. While sanitizeFilter wraps query operators in $eq to neutralize them, $nor was omitted from recursive sanitization. Since $nor accepts arrays and arrays do not trigger the hasDollarKeys() check, attackers could inject operators like $ne, $gt, or $regex inside $nor clauses, bypassing sanitization. This flaw was addressed in mongoose versions 6.13.9, 7.8.9, 8.22.1, and 9.1.6.
Potential Impact
The vulnerability allows an attacker to bypass mongoose's query sanitization, potentially enabling injection of malicious query operators that could lead to unauthorized data disclosure. The CVSS score of 7.5 indicates a high severity impact on confidentiality. There is no indication of impact on integrity or availability. No known exploits are reported in the wild at this time.
Mitigation Recommendations
A fix is available in mongoose versions 6.13.9, 7.8.9, 8.22.1, and 9.1.6. Users should upgrade to these or later versions to remediate the vulnerability. Patch status is not explicitly stated in a vendor advisory, but the fixed versions are clearly identified. No additional mitigation steps are specified.
CVE-2026-42334: CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') in Automattic mongoose
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.
CVSS v3.1
Score 7.5high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Mongoose, a MongoDB object modeling tool, had a vulnerability (CVE-2026-42334) where its sanitizeFilter mechanism failed to sanitize the $nor logical operator. While sanitizeFilter wraps query operators in $eq to neutralize them, $nor was omitted from recursive sanitization. Since $nor accepts arrays and arrays do not trigger the hasDollarKeys() check, attackers could inject operators like $ne, $gt, or $regex inside $nor clauses, bypassing sanitization. This flaw was addressed in mongoose versions 6.13.9, 7.8.9, 8.22.1, and 9.1.6.
Potential Impact
The vulnerability allows an attacker to bypass mongoose's query sanitization, potentially enabling injection of malicious query operators that could lead to unauthorized data disclosure. The CVSS score of 7.5 indicates a high severity impact on confidentiality. There is no indication of impact on integrity or availability. No known exploits are reported in the wild at this time.
Mitigation Recommendations
A fix is available in mongoose versions 6.13.9, 7.8.9, 8.22.1, and 9.1.6. Users should upgrade to these or later versions to remediate the vulnerability. Patch status is not explicitly stated in a vendor advisory, but the fixed versions are clearly identified. No additional mitigation steps are specified.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-26T13:26:14.514Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a0612baec166c07b0023457
Added to database: 05/14/2026, 18:21:46 UTC
Last enriched: 05/14/2026, 18:36:40 UTC
Last updated: 07/31/2026, 19:22:58 UTC
Views: 127
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.