# CVE-2026-125117: Mongoose prototype pollution in object initialization

Source: https://junglewise.ai/threats/cve-2026-125117-mongoose-is-a-mongodb-object-modeling-tool-designed-to-work-in  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-11-09. Updated: 2026-11-10  
License: CC BY 4.0 with a link back

CVE-2026-125117 · Severity: high · CVSS 8.2 · Published 2026-11-09

Mongoose is a widely-used MongoDB data modeling library for Node.js applications. A prototype pollution vulnerability allows attackers to corrupt shared JavaScript objects through crafted database documents or API calls, causing subsequent database queries on unrelated models to fail or behave unexpectedly. An attacker with ability to control document data or query parameters can trigger denial of service or alter validator behavior across the application.

Technologies: [Automattic Mongoose](https://junglewise.ai/threats/technologies/automattic-mongoose), [mongoose (npm)](https://junglewise.ai/threats/technologies/mongoose). Vendors: [Automattic](https://junglewise.ai/threats/vendors/automattic), [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2026-125117 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-125117 being exploited in the wild.

**How severe is CVE-2026-125117?** High severity, with a CVSS score of 8.2, published 9 November 2026.

**Which products and versions are affected?** Automattic Mongoose before 6.13.12, 7.x before 7.8.13, 8.x before 8.24.7, 9.x before 9.11.4; mongoose (npm) < 6.13.12, SEMVER:introduced=0,fixed=6.13.12.

**Is there a fix for CVE-2026-125117?** Yes. mongoose (npm): upgrade to 6.13.12 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-125117 attacked?** It is attacked over the network.

**Am I affected by CVE-2026-125117?** Check whether you run Automattic Mongoose or mongoose (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- mongoose (npm): upgrade to 6.13.12 or later

  ```sh
  npm install mongoose@6.13.12
  ```


## Technical details

The vulnerability exists in Mongoose's init(), $__set, and mergeClone functions, which descend into inherited properties when processing database documents without proper filtering of dangerous keys like toString and valueOf. By controlling dotted paths in subdocuments with strict: false, or through findOneAndReplace() replacements and Query.prototype.merge() calls, an attacker can overwrite properties on shared built-in objects such as Object.prototype. This causes Object.prototype.toString to fail for unrelated models and allows alteration of shared validators and schema options.

## Affected products

- Automattic Mongoose before 6.13.12, 7.x before 7.8.13, 8.x before 8.24.7, 9.x before 9.11.4

## Identifiers

- CVE-2026-125117
- GHSA-8332-j7wj-wjw4

## Timeline

- 2026-11-09: disclosed

## References

- [https://github.com/Automattic/mongoose/commit/18b5513dd463731a2caf0d3395ef1d9eb0735f50](https://github.com/Automattic/mongoose/commit/18b5513dd463731a2caf0d3395ef1d9eb0735f50)
- [https://github.com/Automattic/mongoose/commit/2a195d19a4dd240f039a0a226614d5804e8187ee](https://github.com/Automattic/mongoose/commit/2a195d19a4dd240f039a0a226614d5804e8187ee)

## Related threats

- [Mongoose sanitizeFilter not applied on countDocuments](https://junglewise.ai/threats/cve-2026-125120-mongoose-sanitizefilter-not-applied-on-countdocuments)
- [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.](https://junglewise.ai/threats/cve-2026-125119-mongoose-connection-level-sanitizefilter-not-applied)
- [Mongoose prototype pollution in Schema.prototype.virtual()](https://junglewise.ai/threats/cve-2026-125118-mongoose-prototype-pollution-via-schema-prototype-virtual)
- [Mongoose discriminator key inheritance bypass](https://junglewise.ai/threats/cve-2026-125116-mongoose-discriminator-key-values-matching-inherited-properties)
- [Mongoose prototype pollution via __proto__ in update casting](https://junglewise.ai/threats/cve-2026-73562-mongoose-prototype-pollution-via-proto-in-update-casting)
