{"id":"CVE-2024-21507","aliases":["CLSA-2026-1777336745","EUVD-2024-1251","GHSA-mqr2-w7wj-jjgr","ROOT-APP-NPM-CVE-2024-21507"],"status":"published","title":"mysql2 cache poisoning vulnerability","description":"Versions of the package mysql2 before 3.9.3 are vulnerable to Improper Input Validation through the keyFromFields function, resulting in cache poisoning. An attacker can inject a colon (:) character within a value of the attacker-crafted key.","severity":{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L/E:P","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-12","score":0.00744,"percentile":0.55262,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-20"],"published":"2024-04-10T05:00:01Z","modified":"2026-10-28T02:31:10Z","fixes":[{"ecosystem":"npm","package":"mysql2","fixed_in":["3.9.3"],"sources":["ghsa","osv"]},{"ecosystem":"TuxCare:npm","package":"mysql2","fixed_in":["2.3.3-tuxcare.4"],"sources":["osv"]},{"ecosystem":"Root:npm","package":"@rootio/mysql2","fixed_in":["3.9.2-root.io.2"],"sources":["osv"]},{"ecosystem":"Root:npm","package":"mysql2","fixed_in":["3.9.2-aikido.2"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"mysql2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.9.3"}]}]},{"source":"osv","ecosystem":"TuxCare:npm","package":"mysql2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.3.3-tuxcare.0"},{"fixed":"2.3.3-tuxcare.4"}]}],"versions":["2.3.3","2.3.3-tuxcare.1","2.3.3-tuxcare.2","2.3.3-tuxcare.3"]},{"source":"osv","ecosystem":"npm","package":"mysql2","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"3.9.3"}]}]},{"source":"osv","ecosystem":"Root:npm","package":"@rootio/mysql2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.9.2-root.io.2"}]}]},{"source":"osv","ecosystem":"Root:npm","package":"mysql2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.9.2-aikido.2"}]}]}],"products":[{"vendor":"mysqljs","product":"mysql2"},{"vendor":"sidorares","product":"mysql2"}],"references":[{"url":"https://security.snyk.io/vuln/SNYK-JS-MYSQL2-6591300","tags":["x_transferred","Exploit","Third Party Advisory","web"]},{"url":"https://github.com/sidorares/node-mysql2/commit/0d54b0ca6498c823098426038162ef10df02c818","tags":["x_transferred","Patch","fix","web"]},{"url":"https://blog.slonser.info/posts/mysql2-attacker-configuration/","tags":["x_transferred","Exploit","Permissions Required","article"]},{"url":"https://github.com/sidorares/node-mysql2/pull/2424","tags":["x_transferred","Exploit","Issue Tracking","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-21507","tags":["advisory"]},{"url":"https://blog.slonser.info/posts/mysql2-attacker-configuration","tags":["web"]},{"url":"https://github.com/advisories/GHSA-mqr2-w7wj-jjgr"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/21xxx/CVE-2024-21507.json","tags":["advisory"]},{"url":"https://github.com/sidorares/node-mysql2","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2024-21507","description":"Versions of the package mysql2 before 3.9.3 are vulnerable to Improper Input Validation through the keyFromFields function, resulting in cache poisoning. An attacker can inject a colon (:) character within a value of the attacker-crafted key.","status":"published","published":"2024-04-10T05:00:01.727Z","modified":"2024-09-18T14:46:37.14Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L/E:P","level":"medium","assessor":"cna"}],"cwes":["CWE-20","CWE-20"],"updated_at":"2026-11-02T14:34:05.077718Z"}],"euvd":[{"id":"EUVD-2024-1251","description":"Versions of the package mysql2 before 3.9.3 are vulnerable to Improper Input Validation through the keyFromFields function, resulting in cache poisoning. An attacker can inject a colon (:) character within a value of the attacker-crafted key.","status":"published","published":"2024-04-10T05:00:01Z","modified":"2024-09-18T14:46:37Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L/E:P","level":"medium"}],"updated_at":"2026-11-03T00:28:21.470786Z"}],"ghsa":[{"id":"GHSA-mqr2-w7wj-jjgr","title":"mysql2 cache poisoning vulnerability","description":"Versions of the package mysql2 before 3.9.3 are vulnerable to Improper Input Validation through the `keyFromFields` function, resulting in cache poisoning. An attacker can inject a colon `:` character within a value of the attacker-crafted key.","status":"published","published":"2024-04-10T15:30:39Z","modified":"2024-08-02T15:40:09Z","cvss":[{"version":"4.0","score":6.9,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N","level":"medium"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L","level":"medium"}],"cwes":["CWE-20"],"updated_at":"2026-11-02T14:37:57.422393Z"}],"nvd":[{"id":"CVE-2024-21507","description":"Versions of the package mysql2 before 3.9.3 are vulnerable to Improper Input Validation through the keyFromFields function, resulting in cache poisoning. An attacker can inject a colon (:) character within a value of the attacker-crafted key.","status":"published","published":"2024-04-10T05:15:48.29Z","modified":"2026-06-17T07:09:38.32Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L","level":"medium","assessor":"secondary"},{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-20"],"updated_at":"2026-11-02T14:09:49.255123Z"}],"osv":[{"id":"CVE-2024-21507","description":"Versions of the package mysql2 before 3.9.3 are vulnerable to Improper Input Validation through the keyFromFields function, resulting in cache poisoning. An attacker can inject a colon (:) character within a value of the attacker-crafted key.","status":"published","published":"2024-04-10T05:00:01.727Z","modified":"2026-10-28T02:31:10.072609408Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L/E:P","level":"medium"}],"cwes":["CWE-20"],"updated_at":"2026-11-02T15:44:38.577405Z"},{"id":"GHSA-mqr2-w7wj-jjgr","title":"mysql2 cache poisoning vulnerability","description":"Versions of the package mysql2 before 3.9.3 are vulnerable to Improper Input Validation through the `keyFromFields` function, resulting in cache poisoning. An attacker can inject a colon `:` character within a value of the attacker-crafted key.","status":"published","published":"2024-04-10T15:30:39Z","modified":"2026-09-10T03:50:12.775552783Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L","level":"medium"},{"version":"4.0","score":6.9,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N","level":"medium"}],"cwes":["CWE-20"],"updated_at":"2026-11-02T15:46:52.170928Z"},{"id":"CLSA-2026-1777336745","title":"TuxCare security update for mysql2 (1 CVE)","description":"TuxCare rebuilt mysql2 to address 1 CVE. Fixed in 2.3.3-tuxcare.4.","status":"published","published":"2026-08-04T14:52:29Z","modified":"2026-10-15T09:45:50.327620222Z","updated_at":"2026-11-02T15:43:44.384419Z"},{"id":"ROOT-APP-NPM-CVE-2024-21507","title":"CVE-2024-21507 in @rootio/mysql2 - Patched by Root","description":"Root has patched CVE-2024-21507 in the @rootio/mysql2 package for Root:npm. Multiple fixed versions available.","status":"published","published":"2026-07-16T06:13:37Z","modified":"2026-07-16T13:00:25.883080268Z","updated_at":"2026-11-02T15:53:27.362922Z"}]}}
