Mongoose ignores connection-level sanitizeFilter in query filters
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- High · None · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub.
Summary
Mongoose from 6.0.0 before 6.13.12, from 7.0.0 before 7.8.13, from 8.0.0 before 8.24.7 and from 9.0.0 before 9.11.4 is affected. Query casting ignores the sanitizeFilter option set through mongoose.connect() or createConnection(), so query selector objects in attacker-controlled filters are not sanitized (CWE-943). An attacker can pass a query operator in a password value to match an account record without the literal password.
Written with Claude Haiku 5.5 from the sources below · 2026-11-11
Description from the CNA
Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment. From 6.0.0 until 6.13.12, 7.8.13, 8.24.7, and 9.11.4, Mongoose stores the connection-level sanitizeFilter option in Connection.config, but Query.prototype._castConditions() and query casting check other option locations and do not read that configuration. An application that enables sanitizeFilter through mongoose.connect() or createConnection() and passes an attacker-controlled object into a query filter therefore receives a connection that reports the defense as enabled while query selector objects remain unsanitized. A crafted password value using a query operator can match an account record without the expected literal password, while global configuration through mongoose.set('sanitizeFilter') and per-query Model.find().sanitizeFilter() remain unaffected. This issue is fixed in versions 6.13.12, 7.8.13, 8.24.7, and 9.11.4.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Automattic | mongoose | 6.0.0 to before 6.13.12; 7.0.0 to before 7.8.13; 8.0.0 to before 8.24.7; 9.0.0 to before 9.11.4 | 6.13.12, 7.8.13, 8.24.7, 9.11.4 | Patch available | CNA |
| — | mongoose (npm) | 6.0.0 to before 6.13.12 | 6.13.12 | Patch available | GHSA-gg4r-jv3p-qx3c |
| — | mongoose (npm) | 7.0.0 to before 7.8.13 | 7.8.13 | Patch available | GHSA-gg4r-jv3p-qx3c |
| — | mongoose (npm) | 8.0.0 to before 8.24.7 | 8.24.7 | Patch available | GHSA-gg4r-jv3p-qx3c |
| — | mongoose (npm) | 9.0.0 to before 9.11.4 | 9.11.4 | Patch available | GHSA-gg4r-jv3p-qx3c |
- mongoose VendorAutomattic Affected 6.0.0 to before 6.13.12; 7.0.0 to before 7.8.13; 8.0.0 to before 8.24.7; 9.0.0 to before 9.11.4 Fixed in 6.13.12, 7.8.13, 8.24.7, 9.11.4 Patch available CNA
- mongoose (npm) Vendor— Affected 6.0.0 to before 6.13.12 Fixed in 6.13.12 Patch available GHSA-gg4r-jv3p-qx3c
- mongoose (npm) Vendor— Affected 7.0.0 to before 7.8.13 Fixed in 7.8.13 Patch available GHSA-gg4r-jv3p-qx3c
- mongoose (npm) Vendor— Affected 8.0.0 to before 8.24.7 Fixed in 8.24.7 Patch available GHSA-gg4r-jv3p-qx3c
- mongoose (npm) Vendor— Affected 9.0.0 to before 9.11.4 Fixed in 9.11.4 Patch available GHSA-gg4r-jv3p-qx3c
Remediation
Mongoose 6 is fixed in 6.13.12, Mongoose 7 in 7.8.13, Mongoose 8 in 8.24.7 and Mongoose 9 in 9.11.4. Until the upgrade, enable sanitizeFilter globally with mongoose.set('sanitizeFilter') or per query with Model.find().sanitizeFilter(), since these settings are not affected.
Written with Claude Haiku 5.5 from the sources below · 2026-11-11
- Fix · CNA mongoose (Automattic) Fixed in 6.13.12, 7.8.13, 8.24.7, 9.11.4
- Fix · GHSA-gg4r-jv3p-qx3c mongoose (npm) Fixed in 6.13.12 Advisory →
- Fix · GHSA-gg4r-jv3p-qx3c mongoose (npm) Fixed in 7.8.13 Advisory →
- Fix · GHSA-gg4r-jv3p-qx3c mongoose (npm) Fixed in 8.24.7 Advisory →
- Fix · GHSA-gg4r-jv3p-qx3c mongoose (npm) Fixed in 9.11.4 Advisory →
Vendor assessments
Timeline
- 2026-11-09 Threatist record created from CVE-2026-125119
- 2026-11-10 Alias added: GHSA-gg4r-jv3p-qx3c
- 2026-11-10 Fix available: npm/[email protected], npm/[email protected], npm/[email protected] +1 · GHSA-gg4r-jv3p-qx3c
- 2026-11-10 CVSS score added · GHSA-gg4r-jv3p-qx3c
- 2026-11-10 Weakness changed · GHSA-gg4r-jv3p-qx3c
- 2026-11-10 11 new references · GHSA-gg4r-jv3p-qx3c
- 2026-11-11 Priority changed: MEDIUM → LOW
- 2026-11-11 Affected versions changed · Red Hat
- 2026-11-11 CVSS score added · Red Hat
- 2026-11-12 CISA SSVC decision points changed
References
Other 10
- https://github.com/Automattic/mongoose/security/advisories/GHSA-gg4r-jv3p-qx3c
- https://github.com/Automattic/mongoose/commit/4bb659478be2f30655a7bdd78bc251bdf111cd29
- https://github.com/Automattic/mongoose/commit/4f4f9a79f860786a54133bee2c9af967ec691491
- https://github.com/Automattic/mongoose/commit/83eda6af1489e9ef60bb8eee8cf9ee005771b9d5
- https://github.com/Automattic/mongoose/commit/b8970c25998c23fbccd17f76c0398b902ff4911d
- https://github.com/Automattic/mongoose/releases/tag/6.13.12
- https://github.com/Automattic/mongoose/releases/tag/7.8.13
- https://github.com/Automattic/mongoose/releases/tag/8.24.7
- https://github.com/Automattic/mongoose/releases/tag/9.11.4
- https://github.com/Automattic/mongoose
More Automattic vulnerabilities
- TI-2023-12700 Improper authentication in WooCommerce Payments WordPress Plugin CVSS 3.1CRITICAL 9.8
- TI-2023-03453 Prototype Pollution in automattic/mongoose CVSS 3.1CRITICAL 9.8
- TI-2024-06106 Jetpack Boost < 3.4.7 - Admin+ SSRF CVSS 3.1CRITICAL 9.1
- TI-2013-01782 WordPress W3 Total Cache Plugin 0.9.2.8 has a Remote PHP Code Execution Vulnerability CVSS 3.1CRITICAL 9.8
- TI-2026-87413 Prototype pollution in Mongoose allows overwriting built-in functions CVSS 3.1HIGH 8.2
- TI-2022-02368 Prototype Pollution in automattic/mongoose CVSS 3.1CRITICAL 9.8
Sources
- CVE-2026-125119 · CVE Program
- CVE-2026-125119 · NVD
- FIRST EPSS
- GHSA-gg4r-jv3p-qx3c · GitHub Advisory Database · CC BY 4.0
- CVE-2026-125119 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences