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.
{
"cna_assigner": "GitHub_M",
"cwe_ids": [
"CWE-1321"
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/125xxx/CVE-2026-125118.json"
}{
"extracted_events": [
{
"range": [
{
"introduced": "0"
},
{
"fixed": "6.13.12"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"introduced": "7.0.0"
},
{
"fixed": "7.8.13"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"introduced": "8.0.0"
},
{
"fixed": "8.24.7"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"introduced": "9.0.0"
},
{
"fixed": "9.11.4"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"fixed": "318f7e09dd363a1dfddb8180878488dccd2796d1"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "74df7769b5a8d89c4413b764029911ee915ea467"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "7a2a6567abbb72c0430c8cc5b7942141844fecff"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "fb467e6d33174293dc0360649f20ce68d99117a9"
}
],
"source": "REFERENCES_COMMIT"
},
{
"original_tag": "6.13.12",
"range": [
{
"fixed": "cfc97ffcb3cf4acb45f3c19692fd727d7d142ed5"
}
],
"source": "REFERENCES_TAG"
},
{
"original_tag": "7.8.13",
"range": [
{
"fixed": "c9f8fe4b878a03dd66f773b89f795b93c7f0e490"
}
],
"source": "REFERENCES_TAG"
},
{
"original_tag": "8.24.7",
"range": [
{
"fixed": "d0e609c73787c996ec0fa40016ebd5ae0f12561f"
}
],
"source": "REFERENCES_TAG"
},
{
"original_tag": "9.11.4",
"range": [
{
"fixed": "8d8b50f8b7e10bd28771d6874a10f971fe5ad5ac"
}
],
"source": "REFERENCES_TAG"
}
]
}