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

Status: published. Published: 2026-11-09. Updated: 2026-11-09.

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.

## Remediation

No remediation reported in collected sources

## Affected products and versions

- Automattic / mongoose: < 6.13.12 (affected); >= 7.0.0, < 7.8.13 (affected); >= 8.0.0, < 8.24.7 (affected); >= 9.0.0, < 9.11.4 (affected). Source: CNA: GitHub_M

## Severity and prioritization

- CVSS 3.1: 6.5 (medium); CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L; source: CNA: GitHub_M

- CVSS 3.1: 6.5 (medium); CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L; source: NVD: security-advisories@github.com

- CISA KEV: No listing in collected sources

- EPSS: Not available

- SSVC: Not available

- Weaknesses: CWE-1321

## Exploit evidence

No exploit evidence in collected sources. This is not proof of no exploitation.

## References

- https://github.com/Automattic/mongoose/security/advisories/GHSA-6972-9mcm-vhwj (CNA: GitHub_M; x_refsource_CONFIRM)

- https://github.com/Automattic/mongoose/commit/318f7e09dd363a1dfddb8180878488dccd2796d1 (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/Automattic/mongoose/commit/74df7769b5a8d89c4413b764029911ee915ea467 (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/Automattic/mongoose/commit/7a2a6567abbb72c0430c8cc5b7942141844fecff (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/Automattic/mongoose/commit/fb467e6d33174293dc0360649f20ce68d99117a9 (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/Automattic/mongoose/releases/tag/6.13.12 (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/Automattic/mongoose/releases/tag/7.8.13 (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/Automattic/mongoose/releases/tag/8.24.7 (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/Automattic/mongoose/releases/tag/9.11.4 (CNA: GitHub_M; x_refsource_MISC)

- https://github.com/Automattic/mongoose/commit/318f7e09dd363a1dfddb8180878488dccd2796d1 (security-advisories@github.com)

- https://github.com/Automattic/mongoose/commit/74df7769b5a8d89c4413b764029911ee915ea467 (security-advisories@github.com)

- https://github.com/Automattic/mongoose/commit/7a2a6567abbb72c0430c8cc5b7942141844fecff (security-advisories@github.com)

- https://github.com/Automattic/mongoose/commit/fb467e6d33174293dc0360649f20ce68d99117a9 (security-advisories@github.com)

- https://github.com/Automattic/mongoose/releases/tag/6.13.12 (security-advisories@github.com)

- https://github.com/Automattic/mongoose/releases/tag/7.8.13 (security-advisories@github.com)

- https://github.com/Automattic/mongoose/releases/tag/8.24.7 (security-advisories@github.com)

- https://github.com/Automattic/mongoose/releases/tag/9.11.4 (security-advisories@github.com)

- https://github.com/Automattic/mongoose/security/advisories/GHSA-6972-9mcm-vhwj (security-advisories@github.com)

## Provenance

- CNA: GitHub_M: https://www.cve.org/CVERecord?id=CVE-2026-125118; retrieved 2026-11-09; source updated 2026-11-09

- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-125118; retrieved 2026-11-10; source updated 2026-11-09

Revision: f16fa33e828f482a438c4941ddb8398746b4e3cfcef4e6031bdecf73359eafa6

Canonical: https://y2.dev/cve/CVE-2026-125118

## Agent and API access

Public CVE pages, Markdown, and JSON are free to read without an account or API key.

- Public catalog: https://y2.dev/cve/index.json. Follow nextCursor with the same search, filters, sort, and limit (1–100). A null cursor marks the end.

- WebMCP: search_cve_disclosures, get_cve_disclosure, get_cve_page_markdown, get_y2_cve_access. Available in compatible browsers.

- Cyber API: https://api.y2.dev/api/v2/cyber/cves and https://api.y2.dev/api/v2/cyber/cves/{cveId}.

- Y2 Pro or Elite: create a workspace API key with the intel:cyber scope and send Authorization: Bearer <Y2_API_KEY>. Setup: https://y2.dev/docs/api/create-key.

- x402: Pay per request without an account or API key. Omit Authorization, read the HTTP 402 PAYMENT-REQUIRED challenge, validate its current requirements, and retry with PAYMENT-SIGNATURE through an authorized payment client. These browser tools never make payments. Guide: https://y2.dev/docs/api/x402.

- OpenAPI: https://y2.dev/api/openapi.yaml. Agent access metadata: https://y2.dev/cve/agent.json.

Collected public records only. Check source status for coverage and freshness.