{"id":"CVE-2024-21509","aliases":["CLSA-2026-1786373168","EUVD-2024-1089","GHSA-49j4-86m8-q2jw","ROOT-APP-NPM-CVE-2024-21509"],"status":"published","title":"mysql2 vulnerable to Prototype Poisoning","description":"Versions of the package mysql2 before 3.9.4 are vulnerable to Prototype Poisoning due to insecure results object creation and improper user input sanitization passed through parserFn in text_parser.js and binary_parser.js.","severity":{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L/E:P","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-12","score":0.00955,"percentile":0.61866,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-1321"],"published":"2024-04-10T05:00:00Z","modified":"2026-10-28T02:30:41Z","fixes":[{"ecosystem":"npm","package":"mysql2","fixed_in":["3.9.4"],"sources":["ghsa","osv"]},{"ecosystem":"TuxCare:npm","package":"mysql2","fixed_in":["2.3.3-tuxcare.5"],"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.4"}]}]},{"source":"osv","ecosystem":"TuxCare:npm","package":"mysql2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.3.3-tuxcare.0"},{"fixed":"2.3.3-tuxcare.5"}]}],"versions":["2.3.3","2.3.3-tuxcare.1","2.3.3-tuxcare.2","2.3.3-tuxcare.3","2.3.3-tuxcare.4"]},{"source":"osv","ecosystem":"npm","package":"mysql2","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"3.9.4"}]}]},{"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-6591084","tags":["x_transferred","Exploit","Third Party Advisory","web"]},{"url":"https://blog.slonser.info/posts/mysql2-attacker-configuration/","tags":["x_transferred","Exploit","Permissions Required","article"]},{"url":"https://github.com/sidorares/node-mysql2/blob/fd3d117da82cc5c5fa5a3701d7b33ca77691bc61/lib/parsers/text_parser.js%23L134","tags":["x_transferred","Broken Link","web"]},{"url":"https://github.com/sidorares/node-mysql2/commit/4a964a3910a4b8de008696c554ab1b492e9b4691","tags":["x_transferred","Patch","fix","web"]},{"url":"https://github.com/sidorares/node-mysql2/pull/2574","tags":["x_transferred","Exploit","Issue Tracking","fix","web"]},{"url":"https://github.com/sidorares/node-mysql2/releases/tag/v3.9.4","tags":["x_transferred","Release Notes","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-21509","tags":["advisory"]},{"url":"https://blog.slonser.info/posts/mysql2-attacker-configuration","tags":["web"]},{"url":"https://github.com/advisories/GHSA-49j4-86m8-q2jw"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/21xxx/CVE-2024-21509.json","tags":["advisory"]},{"url":"https://github.com/sidorares/node-mysql2","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2024-21509","description":"Versions of the package mysql2 before 3.9.4 are vulnerable to Prototype Poisoning due to insecure results object creation and improper user input sanitization passed through parserFn in text_parser.js and binary_parser.js.","status":"published","published":"2024-04-10T05:00:00.795Z","modified":"2024-08-22T13:11:18.154Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L/E:P","level":"medium","assessor":"cna"}],"cwes":["CWE-1321","CWE-1321"],"updated_at":"2026-11-02T14:34:04.681315Z"}],"euvd":[{"id":"EUVD-2024-1089","description":"Versions of the package mysql2 before 3.9.4 are vulnerable to Prototype Poisoning due to insecure results object creation and improper user input sanitization passed through parserFn in text_parser.js and binary_parser.js.","status":"published","published":"2024-04-10T05:00:00Z","modified":"2024-08-22T13:11:18Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L/E:P","level":"medium"}],"updated_at":"2026-11-03T00:56:13.216602Z"}],"ghsa":[{"id":"GHSA-49j4-86m8-q2jw","title":"mysql2 vulnerable to Prototype Poisoning","description":"Versions of the package mysql2 before 3.9.4 are vulnerable to Prototype Poisoning due to insecure results object creation and improper user input sanitization passed through `parserFn` in `text_parser.js` and `binary_parser.js`.","status":"published","published":"2024-04-10T15:30:39Z","modified":"2024-08-22T16:17:38Z","cvss":[{"version":"4.0","score":6.9,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/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:N/I:L/A:L","level":"medium"}],"cwes":["CWE-1321"],"updated_at":"2026-11-02T14:37:59.336921Z"}],"nvd":[{"id":"CVE-2024-21509","description":"Versions of the package mysql2 before 3.9.4 are vulnerable to Prototype Poisoning due to insecure results object creation and improper user input sanitization passed through parserFn in text_parser.js and binary_parser.js.","status":"published","published":"2024-04-10T05:15:48.547Z","modified":"2026-06-17T07:09:38.567Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L","level":"medium","assessor":"secondary"}],"cwes":["CWE-1321"],"updated_at":"2026-11-02T14:09:49.255123Z"}],"osv":[{"id":"CVE-2024-21509","description":"Versions of the package mysql2 before 3.9.4 are vulnerable to Prototype Poisoning due to insecure results object creation and improper user input sanitization passed through parserFn in text_parser.js and binary_parser.js.","status":"published","published":"2024-04-10T05:00:00.795Z","modified":"2026-10-28T02:30:41.863943629Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L/E:P","level":"medium"}],"cwes":["CWE-1321"],"updated_at":"2026-11-02T15:44:38.577405Z"},{"id":"GHSA-49j4-86m8-q2jw","title":"mysql2 vulnerable to Prototype Poisoning","description":"Versions of the package mysql2 before 3.9.4 are vulnerable to Prototype Poisoning due to insecure results object creation and improper user input sanitization passed through `parserFn` in `text_parser.js` and `binary_parser.js`.","status":"published","published":"2024-04-10T15:30:39Z","modified":"2026-09-10T03:50:11.188830865Z","cvss":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/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:N/VI:L/VA:L/SC:N/SI:N/SA:N","level":"medium"}],"cwes":["CWE-1321"],"updated_at":"2026-11-02T15:46:36.782754Z"},{"id":"CLSA-2026-1786373168","title":"TuxCare security update for mysql2 (1 CVE)","description":"TuxCare rebuilt mysql2 to address 1 CVE. Fixed in 2.3.3-tuxcare.5.","status":"published","published":"2026-08-10T14:46:08Z","modified":"2026-10-15T09:46:01.252489317Z","updated_at":"2026-11-02T15:43:46.850893Z"},{"id":"ROOT-APP-NPM-CVE-2024-21509","title":"CVE-2024-21509 in @rootio/mysql2 - Patched by Root","description":"Root has patched CVE-2024-21509 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:21.636274006Z","updated_at":"2026-11-02T15:53:27.362922Z"}]}}
