{"id":"CVE-2026-125119","summary":"Mongoose: Connection-level sanitizeFilter not applied","details":"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.","aliases":["BIT-mongoose-2026-125119","GHSA-gg4r-jv3p-qx3c"],"modified":"2026-11-27T06:55:58.082188957Z","published":"2026-11-09T22:32:49.132Z","database_specific":{"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"},"references":[{"type":"WEB","url":"https://github.com/Automattic/mongoose/releases/tag/6.13.12"},{"type":"WEB","url":"https://github.com/Automattic/mongoose/releases/tag/7.8.13"},{"type":"WEB","url":"https://github.com/Automattic/mongoose/releases/tag/8.24.7"},{"type":"WEB","url":"https://github.com/Automattic/mongoose/releases/tag/9.11.4"},{"type":"ADVISORY","url":"https://github.com/Automattic/mongoose/security/advisories/GHSA-gg4r-jv3p-qx3c"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/125xxx/CVE-2026-125119.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-125119"},{"type":"FIX","url":"https://github.com/Automattic/mongoose/commit/4bb659478be2f30655a7bdd78bc251bdf111cd29"},{"type":"FIX","url":"https://github.com/Automattic/mongoose/commit/4f4f9a79f860786a54133bee2c9af967ec691491"},{"type":"FIX","url":"https://github.com/Automattic/mongoose/commit/83eda6af1489e9ef60bb8eee8cf9ee005771b9d5"},{"type":"FIX","url":"https://github.com/Automattic/mongoose/commit/b8970c25998c23fbccd17f76c0398b902ff4911d"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/automattic/mongoose","events":[{"introduced":"c4b2a7ca8ab8434037d02eca6f8d6430b4f7752f"},{"fixed":"cfc97ffcb3cf4acb45f3c19692fd727d7d142ed5"},{"introduced":"9b1ff1fe2ae42c985b31a57a084462a07619a546"},{"fixed":"c9f8fe4b878a03dd66f773b89f795b93c7f0e490"},{"introduced":"582156858db3ca7fbaa8950dc997e0d9e8117b21"},{"fixed":"d0e609c73787c996ec0fa40016ebd5ae0f12561f"},{"introduced":"93c780b6e1c24a6b4ab42c14e64a2500da87a54b"},{"fixed":"8d8b50f8b7e10bd28771d6874a10f971fe5ad5ac"},{"fixed":"4bb659478be2f30655a7bdd78bc251bdf111cd29"},{"fixed":"4f4f9a79f860786a54133bee2c9af967ec691491"},{"fixed":"83eda6af1489e9ef60bb8eee8cf9ee005771b9d5"},{"fixed":"b8970c25998c23fbccd17f76c0398b902ff4911d"}],"database_specific":{"extracted_events":[{"range":[{"introduced":"6.0.0"},{"fixed":"6.13.12"}],"source":"AFFECTED_FIELD","strategy":"StringRangeExpression"},{"source":"AFFECTED_FIELD","strategy":"StringRangeExpression","range":[{"introduced":"7.0.0"},{"fixed":"7.8.13"}]},{"range":[{"introduced":"8.0.0"},{"fixed":"8.24.7"}],"source":"AFFECTED_FIELD","strategy":"StringRangeExpression"},{"strategy":"StringRangeExpression","range":[{"introduced":"9.0.0"},{"fixed":"9.11.4"}],"source":"AFFECTED_FIELD"},{"source":"REFERENCES_COMMIT","range":[{"fixed":"4bb659478be2f30655a7bdd78bc251bdf111cd29"}]},{"range":[{"fixed":"4f4f9a79f860786a54133bee2c9af967ec691491"}],"source":"REFERENCES_COMMIT"},{"range":[{"fixed":"83eda6af1489e9ef60bb8eee8cf9ee005771b9d5"}],"source":"REFERENCES_COMMIT"},{"range":[{"fixed":"b8970c25998c23fbccd17f76c0398b902ff4911d"}],"source":"REFERENCES_COMMIT"},{"source":"REFERENCES_TAG","original_tag":"6.13.12","range":[{"fixed":"cfc97ffcb3cf4acb45f3c19692fd727d7d142ed5"}]},{"range":[{"fixed":"c9f8fe4b878a03dd66f773b89f795b93c7f0e490"}],"source":"REFERENCES_TAG","original_tag":"7.8.13"},{"range":[{"fixed":"d0e609c73787c996ec0fa40016ebd5ae0f12561f"}],"source":"REFERENCES_TAG","original_tag":"8.24.7"},{"original_tag":"9.11.4","range":[{"fixed":"8d8b50f8b7e10bd28771d6874a10f971fe5ad5ac"}],"source":"REFERENCES_TAG"}]}}],"versions":["9.11.3","7.8.12","8.24.6","8.24.5","9.11.2","9.11.1","9.11.0","9.10.4","9.10.3","9.10.2","9.10.1","9.10.0","9.9.5","8.24.4","9.9.4","8.24.3","9.9.3","9.9.2","6.13.11","7.8.11","8.24.2","9.9.1","9.9.0","9.8.1","9.8.0","9.7.4","7.8.10","9.7.3","8.24.1","9.7.2","6.13.10","9.7.1","9.7.0","9.6.3","8.24.0","9.6.2","8.23.1","9.5.0","9.4.1","9.4.0","9.3.3","9.3.2","9.3.1","8.23.0","9.3.0","9.2.4","9.2.3","9.2.2","9.2.0","9.2.1","9.1.6","8.22.1","8.22.0","7.8.8","6.13.9","8.21.1","9.1.5","9.1.4","8.21.0","9.1.3","9.1.2","9.1.1","9.1.0","8.20.4","9.0.2","8.20.3","9.0.1","8.20.2","9.0.0","8.20.1","8.20.0","8.19.4","8.19.3","8.19.2","8.19.1","8.19.0","8.18.3","8.18.2","8.18.1","8.17.1","8.18.0","8.17.2","8.17.0","8.16.5","8.16.4","8.16.3","8.16.2","8.16.1","8.16.0","8.15.2","8.15.1","7.8.7","8.15.0","8.14.3","8.14.2","8.14.1","8.14.0","8.13.3","8.13.2","8.13.1","8.13.0","8.12.2","8.12.1","8.12.0","8.11.0","8.10.2","8.10.1","8.10.0","8.9.7","8.9.6","7.8.6","6.13.8","7.8.5","7.8.4","6.13.7","6.13.6","8.9.5","6.13.5","8.9.4","8.9.3","8.9.2","8.9.1","8.9.0","8.8.4","8.8.3","7.8.3","6.13.4","8.8.2","8.8.0","8.8.1","7.8.2","6.13.3","8.7.3","8.7.2","8.7.1","8.7.0","8.6.4","6.13.2","8.6.3","8.6.2","6.13.1","8.6.0","8.6.1","8.5.5","8.5.4","7.8.1","8.5.3","8.5.2","7.8.0","6.13.0","8.5.1","7.7.0","8.5.0","8.4.5","8.4.4","8.4.3","8.4.2","7.6.13","8.4.1","6.12.9","7.6.12","8.4.0","8.3.5","8.3.4","6.12.8","8.3.3","7.6.11","8.3.2","8.3.1","7.6.10","8.3.0","8.2.4","8.2.3","8.2.2","8.2.1","6.12.7","7.6.9","8.2.0","6.12.6","8.1.3","8.1.2","8.1.1","8.1.0","6.12.5","8.0.4","7.6.8","7.6.7","6.12.4","8.0.3","8.0.2","7.6.6","8.0.1","7.6.5","8.0.0","6.12.2","7.6.4","6.12.1","7.6.3","7.6.2","7.6.1","7.6.0","7.5.4","6.12.0","7.5.3","7.5.2","7.5.1","7.5.0","7.4.5","6.11.6","7.4.4","7.4.3","6.11.5","7.4.2","7.4.1","6.11.4","7.4.0","6.11.3","7.3.4","7.3.3","7.3.2","7.3.1","7.3.0","7.2.4","7.2.3","6.11.2","7.2.2","7.2.1","7.2.0","7.1.2","7.1.1","6.11.1","6.11.0","7.1.0","7.0.5","7.0.4","6.10.5","7.0.3","6.10.4","7.0.2","6.10.3","6.10.2","7.0.1","6.10.1","7.0.0","6.10.0","6.9.3","6.9.2","6.9.1","6.9.0","6.8.5","6.8.4","6.8.3","6.8.2","6.8.1","6.8.0","6.7.5","6.7.4","6.7.3","6.7.2","6.7.1","6.7.0","6.6.7","6.6.6","6.6.5","6.6.4","6.6.3","6.6.2","6.6.1","6.6.0","6.5.5","6.5.4","6.5.3","6.5.2","6.5.1","6.5.0","6.4.4","6.4.3","6.4.2","6.4.1","6.4.0","6.3.9","6.3.8","6.3.7","6.3.6","6.3.5","6.3.4","6.3.3","6.3.2","6.3.1","6.3.0","6.2.11","6.2.10","6.2.9","6.2.8","6.2.7","6.2.6","6.2.5","6.2.4","6.2.3","6.2.2","6.1.8","6.1.7","6.1.6","6.1.5","6.1.4","6.1.3","6.1.2","test","6.1.1","6.1.0","6.0.15","6.0.14","6.0.13","6.0.12","6.0.11","6.0.10","6.0.9","6.0.8","6.0.7","6.0.6","6.0.5","6.0.4","6.0.3","6.0.2","6.0.1","6.0.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-125119.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"}]}