{"id":"GHSA-m7xq-9374-9rvx","summary":"Mongoose search injection vulnerability","details":"Mongoose versions prior to 8.8.3, 7.8.3, 6.13.5, and 5.13.23 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.","aliases":["BIT-mongoose-2024-53900","CVE-2024-53900"],"modified":"2026-02-05T00:01:59.584013Z","published":"2024-12-02T21:31:20Z","database_specific":{"severity":"HIGH","github_reviewed":true,"github_reviewed_at":"2024-12-02T22:19:11Z","nvd_published_at":"2024-12-02T20:15:08Z","cwe_ids":["CWE-89"]},"references":[{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-53900"},{"type":"WEB","url":"https://github.com/github/advisory-database/pull/6769"},{"type":"WEB","url":"https://github.com/github/advisory-database/pull/6776"},{"type":"WEB","url":"https://github.com/Automattic/mongoose/commit/33679bcf8ca43d74e3e8ecd4cc224826772d805b"},{"type":"WEB","url":"https://github.com/Automattic/mongoose/commit/bbb6fa7ecb44bbaf5bea955d886378a1247bce0b"},{"type":"WEB","url":"https://github.com/Automattic/mongoose/commit/c9e86bff7eef477da75a29af62a06d41a835a156"},{"type":"PACKAGE","url":"https://github.com/Automattic/mongoose"},{"type":"WEB","url":"https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md"},{"type":"WEB","url":"https://github.com/Automattic/mongoose/compare/6.13.4...6.13.5"},{"type":"WEB","url":"https://github.com/Automattic/mongoose/compare/7.8.2...7.8.3"},{"type":"WEB","url":"https://github.com/Automattic/mongoose/compare/8.8.2...8.8.3"},{"type":"WEB","url":"https://github.com/Automattic/mongoose/releases"},{"type":"WEB","url":"https://www.npmjs.com/package/mongoose?activeTab=versions"}],"affected":[{"package":{"name":"mongoose","ecosystem":"npm","purl":"pkg:npm/mongoose"},"ranges":[{"type":"SEMVER","events":[{"introduced":"8.0.0-rc0"},{"fixed":"8.8.3"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/12/GHSA-m7xq-9374-9rvx/GHSA-m7xq-9374-9rvx.json"}},{"package":{"name":"mongoose","ecosystem":"npm","purl":"pkg:npm/mongoose"},"ranges":[{"type":"SEMVER","events":[{"introduced":"7.0.0-rc0"},{"fixed":"7.8.3"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/12/GHSA-m7xq-9374-9rvx/GHSA-m7xq-9374-9rvx.json"}},{"package":{"name":"mongoose","ecosystem":"npm","purl":"pkg:npm/mongoose"},"ranges":[{"type":"SEMVER","events":[{"introduced":"6.0.0-rc0"},{"fixed":"6.13.5"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/12/GHSA-m7xq-9374-9rvx/GHSA-m7xq-9374-9rvx.json"}},{"package":{"name":"mongoose","ecosystem":"npm","purl":"pkg:npm/mongoose"},"ranges":[{"type":"SEMVER","events":[{"introduced":"3.6.0-rc0"},{"fixed":"5.13.23"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/12/GHSA-m7xq-9374-9rvx/GHSA-m7xq-9374-9rvx.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"},{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N"}]}