CVE-2026-42334
HIGH 7.5CVSS 3.1Mongoose's Improper Sanitization of $nor in sanitizeFilter May Allow NoSQL Injection
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.
- Published
- 14 May 2026
- Last modified
- 26 Oct 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-74
- Also known as
- BIT-mongoose-2026-42334GHSA-wpg9-53fq-2r8h
- Sources
- NVDJSONOSV GHSA-wpg9-53fq-2r8hJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| OSV | GitHub | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | mongoosejs | mongoosecpe:2.3:a:mongoosejs:mongoose:*:*:*:*:*:node.js:*:* |
< 6.13.9 | 6.13.9 |
| NVD | mongoosejs | mongoosecpe:2.3:a:mongoosejs:mongoose:*:*:*:*:*:node.js:*:* |
>= 7.0.0, < 7.8.9 | 7.8.9 |
| NVD | mongoosejs | mongoosecpe:2.3:a:mongoosejs:mongoose:*:*:*:*:*:node.js:*:* |
>= 8.0.0, < 8.22.1 | 8.22.1 |
| NVD | mongoosejs | mongoosecpe:2.3:a:mongoosejs:mongoose:*:*:*:*:*:node.js:*:* |
>= 9.0.0, < 9.1.6 | 9.1.6 |
| OSV | npm | mongoose | < 6.13.9 | 6.13.9 |
| OSV | npm | mongoose | >= 7.0.0, < 7.8.9 | 7.8.9 |
| OSV | npm | mongoose | >= 8.0.0, < 8.22.1 | 8.22.1 |
| OSV | npm | mongoose | >= 9.0.0, < 9.1.6 | 9.1.6 |
References
- https://github.com/Automattic/mongoose/security/advisories/GHSA-wpg9-53fq-2r8h · Mitigation, Vendor Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-42334 · ADVISORY
- https://github.com/Automattic/mongoose · PACKAGE
- https://mongoosejs.com/docs/api/mongoose.html#Mongoose.prototype.sanitizeFilter() · WEB
- https://thecodebarbarian.com/whats-new-in-mongoose-6-sanitizefilter.html · WEB
History
- 25 Nov 2026 21:02 UTC · NVD: first stored (published 14 May 2026)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 5 May 2026)