CVE-2026-73562
JSON

6.5medium

Mongoose: Prototype pollution in the update casting via __proto__-prefixed dotted path (Schema._getSchema/path getter)

Severity
6.5medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.37% (higher than 32% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-664h-wqgq-64gwBIT-MONGOOSE-2026-73562

Description

Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment. Prior to 6.13.10, 7.8.10, 8.24.1, and 9.7.2, passing a user-controlled update such as MyModel.updateOne(filter, req.body) can exploit Mongoose update casting with a __proto__.x dotted path under $set. Schema.prototype.path and Schema.prototype._getPathType can treat inherited properties of schema.paths and schema.nested as schema types, allowing the casting process to set $fullPath and $parentSchemaDocArray on Object.prototype before throwing. This prototype pollution makes those properties visible on newly created objects and can cause application integrity and availability impacts. This issue is fixed in versions 6.13.10, 7.8.10, 8.24.1, and 9.7.2.

Affected

Product or packageVersionsReported by
Automattic mongoose< 6.13.10, >= 7.0.0, < 7.8.10, >= 8.0.0, < 8.24.1, >= 9.0.0, < 9.7.2CVE List
mongoose (npm)before 6.13.10, from 7.0.0 before 7.8.10, from 8.0.0 before 8.24.1, from 9.0.0 before 9.7.2GitHub Advisory Database
mongoose (Bitnami)before 6.13.10, from 7.0.0 before 7.8.10, from 8.0.0 before 8.24.1, from 9.0.0 before 9.7.2Bitnami Vulnerability Database

All scores

GitHub_M6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L
GitHub6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L
Bitnami Vulnerability Databasemedium rating

Classification

CWE-1321

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

What each source says

CVE List

Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment. Prior to 6.13.10, 7.8.10, 8.24.1, and 9.7.2, passing a user-controlled update such as MyModel.updateOne(filter, req.body) can exploit Mongoose update casting with a __proto__.x dotted path under $set. Schema.prototype.path and Schema.prototype._getPathType can treat inherited properties of schema.paths and schema.nested as schema types, allowing the casting process to set $fullPath and $parentSchemaDocArray on Object.prototype before throwing. This prototype pollution makes those properties visible on newly created objects and can cause application integrity and availability impacts. This issue is fixed in versions 6.13.10, 7.8.10, 8.24.1, and 9.7.2.

GitHub Advisory Database
Impact

What kind of vulnerability is it? Who is impacted?

Prototype 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.

Example:

const mongoose = require('mongoose');
console.log('before:', Object.prototype.$fullPath);            // undefined

const User = mongoose.model('User', new mongoose.Schema({ name: String }));
const malicious = JSON.parse('{"$set": {"__proto__.x": "anything"}}');   // attacker-controlled update

const q = User.updateOne({}, {});
try { q._castUpdate(malicious); } catch (e) { /* throws AFTER the pollution side-effect */ }

console.log('after :', Object.prototype.$fullPath);            // "__proto__"
console.log('enumerable:', Object.prototype.propertyIsEnumerable('$fullPath'));  // true
console.log('fresh {}:', ({}).$fullPath);                      // "__proto__"
Patches

Has the problem been patched? What versions should users upgrade to?

9.7.2, 8.24.1. 7.8.10, 6.13.10

Workarounds

Is there a way for users to fix or remediate the vulnerability without upgrading?

Check user-controlled updates for own __proto__ properties before passing to Mongoose

References

Are there any links users can visit to find out more?

NVD (es)

Mongoose es una herramienta de modelado de objetos de MongoDB diseñada para funcionar en un entorno asíncrono. Antes de las versiones 6.13.10, 7.8.10, 8.24.1 y 9.7.2, pasar una actualización controlada por el usuario, como MyModel.updateOne(filter, req.body), puede exploit el casting de actualización de Mongoose con una ruta punteada “__proto__.x” bajo $set. Schema.prototype.path y Schema.prototype._getPathType pueden tratar las propiedades heredadas de schema.paths y schema.nested como tipos de esquema, permitiendo que el proceso de casting establezca $fullPath y $parentSchemaDocArray en Object.prototype antes de lanzar una excepción. Esta contaminación de prototipos hace que esas propiedades sean visibles en objetos recién creados y puede causar impactos en la integridad y disponibilidad de la aplicación. Este problema está solucionado en las versiones 6.13.10, 7.8.10, 8.24.1 y 9.7.2.

References

https://github.com/Automattic/mongoose/security/advisories/GHSA-664h-wqgq-64gwweb
https://github.com/Automattic/mongoose/commit/35a3f33bc9a0a28671f99e3c5010000425650d0fweb
https://github.com/Automattic/mongoose/commit/7285466b860d3b511f8d07b2ab72656703ee707aweb
https://github.com/Automattic/mongoose/commit/953d085bee5a16b5d6c5af33a156e6314d6d9a45web
https://github.com/Automattic/mongoose/commit/fab793b747131c68927888cba41cf3e6d6593740web
https://github.com/Automattic/mongoose/pull/16230web
https://github.com/Automattic/mongoose/commit/f494b8430f9097fc70446d6949c8a42a27518e0bweb
https://github.com/Automattic/mongoosepackage
https://github.com/Automattic/mongoose/releases/tag/6.13.10web
https://github.com/Automattic/mongoose/releases/tag/7.8.10web
https://github.com/Automattic/mongoose/releases/tag/8.24.1web
https://github.com/Automattic/mongoose/releases/tag/9.7.2web

Sources

SourceRecordLicence
CVE ListCVE-2026-73562 changed 2026-08-14CVE Terms of Use
GitHub Advisory DatabaseGHSA-664h-wqgq-64gw changed 2026-08-19CC-BY-4.0
NVDCVE-2026-73562 changed 2026-10-24Public domain
Bitnami Vulnerability DatabaseBIT-MONGOOSE-2026-73562 changed 2026-08-19Apache-2.0