Public mode

No access to your tenant or devices. Every item links to its source. What this means

Sources need attention Customize Public modeDiscuss ChangeIntel on Discord

Mongoose: Prototype pollution via Schema.prototype.virtual()

CVSS 3.1 6.5 MEDIUMEUVD CVSS 3.1 6.5 CVSS 3.1 · [email protected] · Secondary 6.5 MEDIUMCVSS_V3 Publisher rating MODERATEFixed by mongoose 6.13.12Fixed by mongoose 7.8.13Fixed by mongoose 8.24.7Fixed by mongoose 9.11.4KEV status unknown

cve-program · CVE-2026-125118

Published

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.

Read the publisher's advisory

euvd · EUVD-2026-120501

Published

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.

Read the publisher's advisory

nvd · CVE-2026-125118

Published

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.

Read the publisher's advisory

osv · GHSA-6972-9mcm-vhwj

Published

### Summary Prototype pollution via Schema.prototype.virtual() — the 2022 fix for CVE-2022-2564 / CVE-2022-24304 protected Schema.path()/add() but never virtual(), so the same class of bug is still exploitable in all maintained release lines. ### Details In lib/schema.js, Schema.prototype.virtual() (defined at line 2643) builds the virtual path via: ```javascript virtuals[name] = parts.reduce(function(mem, part, i) { mem[part] || (mem[part] = (i === parts.length - 1) ? new VirtualType(options, name) : {}); return mem[part]; }, this.tree); // lines 2755-2759 ``` Unlike `path()`/`add()`, `virtual()` never received the `specialProperties` check added for CVE-2022-2564/CVE-2022-24304 (`lib/schema.js` lines 806, 1308, 1331). A path containing `__proto__`/`constructor`/`prototype` segments resolves through the prototype chain and writes onto `Object.prototype` / `Function.prototype`. ### Proof of concept ```javascript const mongoose = require('mongoose'); const schema = new mongoose.Schema({}); schema.virtual('__proto__.polluted'); console.log(({}).polluted); // VirtualType instance console.log(Object.prototype.hasOwnProperty('polluted')); // true console.log(Object.getOwnPropertyDescriptor( Object.prototype, 'polluted').enumerable); // true schema.virtual('constructor.prototype.opol'); console.log(({}).opol); // true schema.virtual('hasOwnProperty.__proto__.fpol'); console.log((function(){}).fpol); // Function.prototype polluted ``` ### Impact Attacker-influenced schema field names (dynamic schemas, CMS form builders, schema-as-code) allow pollution of Object.prototype (own, enumerable keys visible on every object — e.g. `({}).isAdmin` checks can be spoofed) and Function.prototype (a known gadget primitive in server-side JS).

Read the publisher's advisory

Affected versions, risk and source history

cve-program · CVE-2026-125118

Published

mongoose

Vendor product

Publisher's version information

Shown as published. These rules are not interpreted as NuGet package version ranges.

{
                    "vendor": "Automattic",
                    "product": "mongoose",
                    "versions": [
                        {
                            "version": "< 6.13.12",
                            "status": "affected"
                        },
                        {
                            "version": ">= 7.0.0, < 7.8.13",
                            "status": "affected"
                        },
                        {
                            "version": ">= 8.0.0, < 8.24.7",
                            "status": "affected"
                        },
                        {
                            "version": ">= 9.0.0, < 9.11.4",
                            "status": "affected"
                        }
                    ]
                }

Original source record · Cite this exact observation · Complete original publisher JSON

euvd · EUVD-2026-120501

Published

EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON.

Original publisher date fields

datePublished: Nov 9, 2026, 10:29:55 PM

dateUpdated: Nov 14, 2026, 2:27:37 AM

No normalized affected-package data is projected for this source revision. The original publisher record may contain additional product and version evidence; this does not establish that a package is unaffected.

Original source record · Cite this exact observation · Complete original publisher JSON

nvd · CVE-2026-125118

Published

NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON.

Source analysis status: Awaiting Analysis

Weakness classifications: CWE-1321

Original publisher date fields

published: 2026-11-09T23:17:22.243

lastModified: 2026-11-14T03:17:24.860

No normalized affected-package data is projected for this source revision. The original publisher record may contain additional product and version evidence; this does not establish that a package is unaffected.

Original source record · Cite this exact observation · Complete original publisher JSON

osv · GHSA-6972-9mcm-vhwj

Published

mongoose

npm

SEMVER · introduced 0 → fixed 6.13.12

mongoose

npm

SEMVER · introduced 7.0.0 → fixed 7.8.13

mongoose

npm

SEMVER · introduced 8.0.0 → fixed 8.24.7

mongoose

npm

SEMVER · introduced 9.0.0 → fixed 9.11.4

Original source record · Cite this exact observation · Complete original publisher JSON

ChangeIntel

An IT change radar: releases, security, known issues, retirements, documentation changes, and service status from public sources. Every item links to supporting evidence; dates and statuses can change after they are read.

Sources read 17 Nov 03:50 UTC · 274 of 275 readable · 250 fully read · 20 waiting for GitHub's hourly limit · documentation 469/469 current