Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment. From 8.5.0 until 8.24.10 and 9.12.2, Mongoose's sanitizeProjection can be bypassed by +path selections, object or array aggregation expressions, nested and parent projections, positional projections, $meta, discriminator-specific exclusions, an own proto key, and projection-cast error paths. Applications that pass attacker-controlled data to select(), find(filter, projection), or the projection option while relying on sanitizeProjection can return fields marked select: false, including password hashes, reset tokens, API keys, and nested secrets. Nested exclusion objects, $elemMatch combined with an exclusion or a cast error, and discriminator filters can also cause ordinary queries that do not enable sanitizeProjection to omit the select: false exclusions that Mongoose normally adds. This issue is fixed in versions 8.24.10 and 9.12.2.
{
"cna_assigner": "GitHub_M",
"cwe_ids": [
"CWE-200"
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/142xxx/CVE-2026-142596.json"
}{
"extracted_events": [
{
"range": [
{
"introduced": "8.5.0"
},
{
"fixed": "8.24.10"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"introduced": "9.0.0"
},
{
"fixed": "9.12.2"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"fixed": "c369da407ee8bea907bb5af7bb94ce5deeb3e0e4"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "c5483b71438ececde3a272feef65e14666614093"
}
],
"source": "REFERENCES_COMMIT"
},
{
"original_tag": "8.24.10",
"range": [
{
"fixed": "f8666d81080a6699e5274d8488c690b4c8171ed6"
}
],
"source": "REFERENCES_TAG"
},
{
"original_tag": "9.12.2",
"range": [
{
"fixed": "a8204d30c4db4ba1138bc75a879c79cf5127670d"
}
],
"source": "REFERENCES_TAG"
}
]
}