{"id":"CVE-2025-23061","aliases":["CVE-2025-23061","GHSA-vg7j-7cwx-8wgw","BIT-MONGOOSE-2025-23061"],"related":[],"kind":"vulnerability","state":"published","title":"Mongoose search injection vulnerability","summary":"Mongoose before 8.9.5 can improperly use a nested $where filter with a populate() match, leading to search injection. NOTE: this issue exists because of an incomplete fix for CVE-2024-53900.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Mongoose before 8.9.5 can improperly use a nested $where filter with a populate() match, leading to search injection. NOTE: this issue exists because of an incomplete fix for CVE-2024-53900.","source":"cvelist"},{"lang":"en","text":"Mongoose versions prior to 8.9.5, 7.8.4, and 6.13.6 are vulnerable to improper use of the `$where` operator. This vulnerability arises from the ability of the `$where` clause to execute arbitrary JavaScript code in MongoDB queries, potentially leading to code injection attacks and unauthorized access or manipulation of database data.\n\nNOTE: this issue exists because of an incomplete fix for CVE-2024-53900.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Mongoose anterior a la versión 8.9.5 puede usar incorrectamente un filtro $where anidado con una coincidencia populate(), lo que provoca una inyección de búsqueda. NOTA: este problema existe debido a una corrección incompleta de CVE-2024-53900.","source":"nvd"}],"published":"2025-01-15T00:00:00.000Z","modified":"2026-09-10T16:01:43.392Z","severity":{"scorer":"mitre","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H","score":9,"rating":"CRITICAL"},"severities":[{"scorer":"mitre","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H","score":9,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H","score":9,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"CRITICAL"}],"cwes":["CWE-94"],"affected":[{"ranges":[{"type":"semver","introduced":"6.0.0","fixed":"6.13.6","status":"affected"},{"type":"semver","introduced":"7.0.0","fixed":"7.8.4","status":"affected"},{"type":"semver","introduced":"8.0.0","fixed":"8.9.5","status":"affected"}],"vendor":"mongoosejs","product":"Mongoose","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"8.0.0-rc0","status":"affected","fixed":"8.9.5"}],"ecosystem":"npm","package":"mongoose","purl":"pkg:npm/mongoose","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"7.0.0-rc0","status":"affected","fixed":"7.8.4"}],"ecosystem":"npm","package":"mongoose","purl":"pkg:npm/mongoose","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"6.13.6"}],"ecosystem":"npm","package":"mongoose","purl":"pkg:npm/mongoose","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"6.13.6"},{"status":"affected","introduced":"7.0.0","fixed":"7.8.4"},{"status":"affected","introduced":"8.0.0","fixed":"8.9.5"}],"vendor":"mongoosejs","product":"mongoose","cpe":"cpe:2.3:a:mongoosejs:mongoose:*:*:*:*:*:node.js:*:*","source":"nvd"},{"ranges":[{"type":"semver","introduced":"6.0.0","status":"affected","fixed":"6.13.6"},{"type":"semver","introduced":"7.0.0","status":"affected","fixed":"7.8.4"},{"type":"semver","introduced":"8.0.0","status":"affected","fixed":"8.9.5"}],"ecosystem":"Bitnami","package":"mongoose","purl":"pkg:bitnami/mongoose","source":"bitnami"}],"references":[{"url":"https://www.npmjs.com/package/mongoose?activeTab=versions","tags":["product","web"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md","tags":["article","release-notes","web"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://github.com/Automattic/mongoose/releases/tag/8.9.5","tags":["article","release-notes","web"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://github.com/Automattic/mongoose/commit/64a9f9706f2428c49e0cfb8e223065acc645f7bc","tags":["fix","patch","web"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-23061","tags":["advisory","web"],"sources":["ghsa","bitnami"]},{"url":"https://github.com/Automattic/mongoose","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/Automattic/mongoose/compare/6.13.5...6.13.6","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/Automattic/mongoose/compare/7.8.3...7.8.4","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/Automattic/mongoose/compare/8.9.4...8.9.5","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/Automattic/mongoose/releases/tag/6.13.6","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/Automattic/mongoose/releases/tag/7.8.4","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/advisories/GHSA-m7xq-9374-9rvx","tags":["advisory"],"sources":["ghsa"]}],"credits":[],"assigner":"mitre","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2025-01-15T15:10:29.550Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-23061","url":"https://www.cve.org/CVERecord?id=CVE-2025-23061","licence":"CVE Terms of Use","modified":"2025-01-15T15:11:21.314Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-vg7j-7cwx-8wgw","url":"https://github.com/advisories/GHSA-vg7j-7cwx-8wgw","licence":"CC-BY-4.0","modified":"2025-10-03T15:40:22.000Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-23061","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-23061","licence":"Public domain","modified":"2026-06-17T08:51:48.000Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-MONGOOSE-2025-23061","url":"https://osv.dev/vulnerability/BIT-MONGOOSE-2025-23061","licence":"Apache-2.0","modified":"2026-09-10T16:01:43.392Z"}],"updatedAt":"2026-11-25T22:58:53.325Z","epss":{"score":0.07236,"percentile":0.94456,"date":"2026-12-01T12:00:22.000Z"}}