Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment. From 6.0.0 until 6.13.12, 7.8.13, 8.24.7, and 9.11.4, Mongoose stores the connection-level sanitizeFilter option in Connection.config, but Query.prototype._castConditions() and query casting check other option locations and do not read that configuration. An application that enables sanitizeFilter through mongoose.connect() or createConnection() and passes an attacker-controlled object into a query filter therefore receives a connection that reports the defense as enabled while query selector objects remain unsanitized. A crafted password value using a query operator can match an account record without the expected literal password, while global configuration through mongoose.set('sanitizeFilter') and per-query Model.find().sanitizeFilter() remain unaffected. 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-943"
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/125xxx/CVE-2026-125119.json"
}{
"extracted_events": [
{
"range": [
{
"introduced": "6.0.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": "4bb659478be2f30655a7bdd78bc251bdf111cd29"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "4f4f9a79f860786a54133bee2c9af967ec691491"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "83eda6af1489e9ef60bb8eee8cf9ee005771b9d5"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "b8970c25998c23fbccd17f76c0398b902ff4911d"
}
],
"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"
}
]
}