CVE-2026-73562: Mongoose Prototype Pollution Vulnerability
MODERATECVE-2026-73562 is a MODERATE (CVSS 6.5) prototype pollution vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting Mongoose libraries in the npm ecosystem. The issue involves prototype pollution in mongoose update casting via __proto__-prefixed dotted path (schema._getschema/path getter). Remediation is available by upgrading affected packages to version 6.13.10, 7.8.10, 8.24.1, 9.7.2.
CVE-2026-73562 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L).
How to Fix CVE-2026-73562
To remediate this vulnerability, upgrade all affected Mongoose dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install mongoose@6.13.10
npm install mongoose@7.8.10
npm install mongoose@8.24.1
npm install mongoose@9.7.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls mongoose
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-73562, inspect your project dependencies using npm:
npm ls mongoose
Analyze the terminal output to locate any version of Mongoose in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.13.10), your application is affected.
Note: The npm ls mongoose command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'), where the product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype. In Mongoose, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-73562 Affected Mongoose Versions
4 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
mongoose
|
npm |
< 6.13.10
|
6.13.10
|
|
mongoose
|
npm |
≥ 7.0.0
< 7.8.10
|
7.8.10
|
|
mongoose
|
npm |
≥ 8.0.0
< 8.24.1
|
8.24.1
|
|
mongoose
|
npm |
≥ 9.0.0
< 9.7.2
|
9.7.2
|
References
Frequently Asked Questions
What is CVE-2026-73562?
Which Mongoose versions are affected?
What version fixes CVE-2026-73562?
Is mongoose affected?
What is the CVSS score of CVE-2026-73562?
What CWE is associated with CVE-2026-73562?
How can I check npm dependencies for CVE-2026-73562?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-664h-wqgq-64gw",
"modified" : "2026-08-13T17:27:25Z",
"published" : "2026-07-24T16:22:34Z",
"aliases" : [ "CVE-2026-73562" ],
"summary" : "Mongoose: Prototype pollution in mongoose update casting via __proto__-prefixed dotted path (Schema._getSchema/path getter)",
"details" : "### Impact\n_What kind of vulnerability is it? Who is impacted?_\n\nPrototype pollution in update casting: passing a user-controlled update to a Mongoose update, like `MyModel.updateOne(filter, req.body)`, can cause Mongoose to set `$fullPath` and `$parentSchemaDocArray` on `Object.prototype`.\n\nExample:\n\n```javascript\nconst mongoose = require('mongoose');\nconsole.log('before:', Object.prototype.$fullPath); // undefined\n\nconst User = mongoose.model('User', new mongoose.Schema({ name: String }));\nconst malicious = JSON.parse('{\"$set\": {\"__proto__.x\": \"anything\"}}'); // attacker-controlled update\n\nconst q = User.updateOne({}, {});\ntry { q._castUpdate(malicious); } catch (e) { /* throws AFTER the pollution side-effect */ }\n\nconsole.log('after :', Object.prototype.$fullPath); // \"__proto__\"\nconsole.log('enumerable:', Object.prototype.propertyIsEnumerable('$fullPath')); // true\nconsole.log('fresh {}:', ({}).$fullPath); // \"__proto__\"\n```\n\n### Patches\n_Has the problem been patched? What versions should users upgrade to?_\n\n9.7.2, 8.24.1. 7.8.10, 6.13.10\n\n### Workarounds\n_Is there a way for users to fix or remediate the vulnerability without upgrading?_\n\nCheck user-controlled updates for own `__proto__` properties before passing to Mongoose\n\n### References\n_Are there any links users can visit to find out more?_",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "mongoose"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "6.13.10"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "mongoose"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "7.0.0"
}, {
"fixed" : "7.8.10"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "mongoose"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.0.0"
}, {
"fixed" : "8.24.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "mongoose"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "9.0.0"
}, {
"fixed" : "9.7.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/Automattic/mongoose/security/advisories/GHSA-664h-wqgq-64gw"
}, {
"type" : "WEB",
"url" : "https://github.com/Automattic/mongoose/pull/16230"
}, {
"type" : "WEB",
"url" : "https://github.com/Automattic/mongoose/commit/f494b8430f9097fc70446d6949c8a42a27518e0b"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/Automattic/mongoose"
}, {
"type" : "WEB",
"url" : "https://github.com/Automattic/mongoose/releases/tag/6.13.10"
}, {
"type" : "WEB",
"url" : "https://github.com/Automattic/mongoose/releases/tag/7.8.10"
}, {
"type" : "WEB",
"url" : "https://github.com/Automattic/mongoose/releases/tag/8.24.1"
}, {
"type" : "WEB",
"url" : "https://github.com/Automattic/mongoose/releases/tag/9.7.2"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1321" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-24T16:22:34Z",
"nvd_published_at" : null
}
}