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

- Severity: High 7.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.46%, higher than 32% of CVEs (2026-11-30)
- Published: 2026-05-05T21:48:06.000Z
- Modified: 2026-10-26T14:10:00.130Z
- Also known as: GHSA-wpg9-53fq-2r8h, BIT-MONGOOSE-2026-42334
- Weaknesses: CWE-74
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- Automattic mongoose: < 6.13.9; >= 7.0.0, <= 7.8.8; >= 8.0.0, <= 8.22.0; >= 9.0.0, <= 9.1.5
- mongoose (npm): before 6.13.9; from 7.0.0 before 7.8.9; from 8.0.0 before 8.22.1; from 9.0.0 before 9.1.6
- mongoosejs mongoose: before 6.13.9; from 7.0.0 before 7.8.9; from 8.0.0 before 8.22.1; from 9.0.0 before 9.1.6
- mongoose (Bitnami): before 6.13.9; from 7.0.0 before 7.8.9; from 8.0.0 before 8.22.1; from 9.0.0 before 9.1.6

## Every score

- GitHub_M: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- Bitnami Vulnerability Database: rating High

## References

- <https://github.com/Automattic/mongoose/security/advisories/GHSA-wpg9-53fq-2r8h> (advisory, mitigation, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-42334> (advisory, web)
- <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)

## Sources

- CVE List: [CVE-2026-42334](https://www.cve.org/CVERecord?id=CVE-2026-42334), CVE Terms of Use, modified 2026-05-14
- GitHub Advisory Database: [GHSA-wpg9-53fq-2r8h](https://github.com/advisories/GHSA-wpg9-53fq-2r8h), CC-BY-4.0, modified 2026-05-18
- NVD: [CVE-2026-42334](https://nvd.nist.gov/vuln/detail/CVE-2026-42334), Public domain, modified 2026-10-26
- Bitnami Vulnerability Database: [BIT-MONGOOSE-2026-42334](https://osv.dev/vulnerability/BIT-MONGOOSE-2026-42334), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2026-42334 · Whole record: https://cve.day/CVE-2026-42334.json · Rebuilt by cve.day 2026-11-25T22:59:21.735Z
