Prototype pollution in Mongoose allows overwriting built-in functions
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- None · Low · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub.
Summary
Mongoose 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 are affected. Attacker-controlled keys such as toString are merged into shared built-in functions instead of own properties (CWE-1321). A remote attacker who supplies crafted data without authentication can overwrite Object.prototype.toString.call, so later queries on unrelated models fail until the process restarts.
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. Prior to 6.13.12, 7.8.13, 8.24.7, and 9.11.4, Mongoose can descend into inherited properties while loading database documents in init(), setting dotted paths in $__set, and merging update documents in utils.mergeClone. Attacker-controlled keys such as toString or valueOf can therefore cause Mongoose to write into shared built-in functions instead of an own property. A crafted document, Mixed path, non-strict document or subdocument, findOneAndReplace() replacement, chained update, or Query.prototype.merge() source can overwrite Object.prototype.toString.call, causing later queries on unrelated models to fail until the process restarts. Separately, when an attacker controls the dotted path passed to doc.set(path, value) for a subdocument configured with strict: false, descent through $__set can reach $__schema and alter shared validators or schema options for later documents. Mongoose already blocks __proto__, constructor, and prototype, so this issue overwrites properties on reachable shared objects rather than adding new properties directly to Object.prototype. 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
- Poc
- 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 | 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) | before 6.13.12 | 6.13.12 | Patch available | GHSA-8332-j7wj-wjw4 |
| — | mongoose (npm) | 7.0.0 to before 7.8.13 | 7.8.13 | Patch available | GHSA-8332-j7wj-wjw4 |
| — | mongoose (npm) | 8.0.0 to before 8.24.7 | 8.24.7 | Patch available | GHSA-8332-j7wj-wjw4 |
| — | mongoose (npm) | 9.0.0 to before 9.11.4 | 9.11.4 | Patch available | GHSA-8332-j7wj-wjw4 |
- mongoose VendorAutomattic Affected 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 before 6.13.12 Fixed in 6.13.12 Patch available GHSA-8332-j7wj-wjw4
- mongoose (npm) Vendor— Affected 7.0.0 to before 7.8.13 Fixed in 7.8.13 Patch available GHSA-8332-j7wj-wjw4
- mongoose (npm) Vendor— Affected 8.0.0 to before 8.24.7 Fixed in 8.24.7 Patch available GHSA-8332-j7wj-wjw4
- mongoose (npm) Vendor— Affected 9.0.0 to before 9.11.4 Fixed in 9.11.4 Patch available GHSA-8332-j7wj-wjw4
Remediation
Fixed versions are 6.13.12 in the 6 line, 7.8.13 in the 7 line, 8.24.7 in the 8 line, and 9.11.4 in the 9 line.
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-8332-j7wj-wjw4 mongoose (npm) Fixed in 6.13.12 Advisory →
- Fix · GHSA-8332-j7wj-wjw4 mongoose (npm) Fixed in 7.8.13 Advisory →
- Fix · GHSA-8332-j7wj-wjw4 mongoose (npm) Fixed in 8.24.7 Advisory →
- Fix · GHSA-8332-j7wj-wjw4 mongoose (npm) Fixed in 9.11.4 Advisory →
Vendor assessments
Timeline
- 2026-11-09 Threatist record created from CVE-2026-125117
- 2026-11-10 CISA SSVC decision points changed
- 2026-11-10 Priority changed: MEDIUM → HIGH
- 2026-11-10 Alias added: GHSA-8332-j7wj-wjw4
- 2026-11-10 Fix available: npm/[email protected], npm/[email protected], npm/[email protected] +1 · GHSA-8332-j7wj-wjw4
- 2026-11-10 CVSS score added · GHSA-8332-j7wj-wjw4
- 2026-11-10 Weakness changed · GHSA-8332-j7wj-wjw4
- 2026-11-10 13 new references · GHSA-8332-j7wj-wjw4
- 2026-11-11 Affected versions changed · Red Hat
- 2026-11-11 CVSS score added · Red Hat
References
Other 12
- https://github.com/Automattic/mongoose/security/advisories/GHSA-8332-j7wj-wjw4
- https://github.com/Automattic/mongoose/commit/18b5513dd463731a2caf0d3395ef1d9eb0735f50
- https://github.com/Automattic/mongoose/commit/2a195d19a4dd240f039a0a226614d5804e8187ee
- https://github.com/Automattic/mongoose/commit/3cb702b8d079c3e267f0b10f41673a1590f703c8
- https://github.com/Automattic/mongoose/commit/85cf897105edfeb5f56be42a18a68704434cac82
- https://github.com/Automattic/mongoose/commit/8cee51beead554df1f3d05645edb439c69eb2a9b
- https://github.com/Automattic/mongoose/commit/8eb74cb4a550cbe0225963b07aebacbd999d4b74
- 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-2022-02368 Prototype Pollution in automattic/mongoose CVSS 3.1CRITICAL 9.8
- TI-2023-02806 Jetpack < 12.1.1 - Author+ Arbitrary File Manipulation via API CVSS 3.1HIGH 8.8
Sources
- CVE-2026-125117 · CVE Program
- CVE-2026-125117 · NVD
- FIRST EPSS
- GHSA-8332-j7wj-wjw4 · GitHub Advisory Database · CC BY 4.0
- CVE-2026-125117 · 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