{"id":"CVE-2024-21508","aliases":["CLSA-2026-1773274566","EUVD-2024-1197","GHSA-fpw7-j2hg-69v5","ROOT-APP-NPM-CVE-2024-21508"],"status":"published","title":"mysql2 Remote Code Execution (RCE) via the readCodeFor function","description":"Versions of the package mysql2 before 3.9.4 are vulnerable to Remote Code Execution (RCE) via the readCodeFor function due to improper validation of the supportBigNumbers and bigNumberStrings values.","severity":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P","level":"critical","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.02554,"percentile":0.85264,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-94"],"published":"2024-04-11T05:00:00Z","modified":"2026-10-28T02:31:13Z","fixes":[{"ecosystem":"npm","package":"mysql2","fixed_in":["3.9.4"],"sources":["ghsa","osv"]},{"ecosystem":"Root:npm","package":"mysql2","fixed_in":["2.3.3-aikido.3","3.7.1-aikido.4","3.9.2-aikido.1","3.9.2-aikido.2","2.3.3-aikido.4","3.7.1-aikido.2","3.7.1-aikido.3"],"sources":["osv"]},{"ecosystem":"Root:npm","package":"@rootio/mysql2","fixed_in":["2.3.3-root.io.2","2.3.3-root.io.1","2.3.3-root.io.3","3.7.1-root.io.4","3.9.2-root.io.1","3.9.2-root.io.2","2.3.3-root.io.4","3.7.1-root.io.2","3.7.1-root.io.3"],"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.2"}]}],"versions":["2.3.3","2.3.3-tuxcare.1"],"bundled":3},{"source":"osv","ecosystem":"npm","package":"mysql2","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"3.9.4"}]}]},{"source":"osv","ecosystem":"Root:npm","package":"mysql2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.3.3-aikido.3"},{"fixed":"3.7.1-aikido.4"},{"fixed":"3.9.2-aikido.1"},{"fixed":"3.9.2-aikido.2"},{"fixed":"2.3.3-aikido.4"},{"fixed":"3.7.1-aikido.2"},{"fixed":"3.7.1-aikido.3"}]}]},{"source":"osv","ecosystem":"Root:npm","package":"@rootio/mysql2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.3.3-root.io.2"},{"fixed":"2.3.3-root.io.1"},{"fixed":"2.3.3-root.io.3"},{"fixed":"3.7.1-root.io.4"},{"fixed":"3.9.2-root.io.1"},{"fixed":"3.9.2-root.io.2"},{"fixed":"2.3.3-root.io.4"},{"fixed":"3.7.1-root.io.2"},{"fixed":"3.7.1-root.io.3"}]}]}],"products":[{"vendor":"mysql2","product":"mysql2"}],"references":[{"url":"https://security.snyk.io/vuln/SNYK-JS-MYSQL2-6591085","tags":["x_transferred","web"]},{"url":"https://blog.slonser.info/posts/mysql2-attacker-configuration/","tags":["x_transferred","article"]},{"url":"https://github.com/sidorares/node-mysql2/blob/1609b5393516d72a4ae47196837317fbe75e0c13/lib/parsers/text_parser.js%23L14C10-L14C21","tags":["x_transferred","web"]},{"url":"https://github.com/sidorares/node-mysql2/pull/2572","tags":["x_transferred","fix","web"]},{"url":"https://github.com/sidorares/node-mysql2/commit/74abf9ef94d76114d9a09415e28b496522a94805","tags":["x_transferred","fix","web"]},{"url":"https://github.com/sidorares/node-mysql2/releases/tag/v3.9.4","tags":["x_transferred","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-21508","tags":["advisory"]},{"url":"https://blog.slonser.info/posts/mysql2-attacker-configuration","tags":["web"]},{"url":"https://github.com/advisories/GHSA-fpw7-j2hg-69v5"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/21xxx/CVE-2024-21508.json","tags":["advisory"]},{"url":"https://github.com/sidorares/node-mysql2","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2024-21508","description":"Versions of the package mysql2 before 3.9.4 are vulnerable to Remote Code Execution (RCE) via the readCodeFor function due to improper validation of the supportBigNumbers and bigNumberStrings values.","status":"published","published":"2024-04-11T05:00:00.748Z","modified":"2024-08-01T22:20:40.908Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P","level":"critical","assessor":"cna"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T14:34:05.077718Z"}],"euvd":[{"id":"EUVD-2024-1197","description":"Versions of the package mysql2 before 3.9.4 are vulnerable to Remote Code Execution (RCE) via the readCodeFor function due to improper validation of the supportBigNumbers and bigNumberStrings values.","status":"published","published":"2024-04-11T05:00:00Z","modified":"2024-08-01T22:20:40Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P","level":"critical"}],"updated_at":"2026-11-03T03:50:29.983832Z"}],"ghsa":[{"id":"GHSA-fpw7-j2hg-69v5","title":"mysql2 Remote Code Execution (RCE) via the readCodeFor function","description":"Versions of the package mysql2 before 3.9.4 are vulnerable to Remote Code Execution (RCE) via the `readCodeFor` function due to improper validation of the `supportBigNumbers` and `bigNumberStrings` values.","status":"published","published":"2024-04-11T06:30:35Z","modified":"2024-04-12T13:50:59Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T14:37:43.62603Z"}],"nvd":[{"id":"CVE-2024-21508","description":"Versions of the package mysql2 before 3.9.4 are vulnerable to Remote Code Execution (RCE) via the readCodeFor function due to improper validation of the supportBigNumbers and bigNumberStrings values.","status":"published","published":"2024-04-11T05:15:47.263Z","modified":"2026-06-17T07:09:38.45Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"secondary"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T14:09:50.299382Z"}],"osv":[{"id":"CVE-2024-21508","description":"Versions of the package mysql2 before 3.9.4 are vulnerable to Remote Code Execution (RCE) via the readCodeFor function due to improper validation of the supportBigNumbers and bigNumberStrings values.","status":"published","published":"2024-04-11T05:00:00.748Z","modified":"2026-10-28T02:31:13.834925452Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P","level":"critical"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T15:44:38.577405Z"},{"id":"GHSA-fpw7-j2hg-69v5","title":"mysql2 Remote Code Execution (RCE) via the readCodeFor function","description":"Versions of the package mysql2 before 3.9.4 are vulnerable to Remote Code Execution (RCE) via the `readCodeFor` function due to improper validation of the `supportBigNumbers` and `bigNumberStrings` values.","status":"published","published":"2024-04-11T06:30:35Z","modified":"2026-09-10T03:50:11.212637363Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-94"],"updated_at":"2026-11-02T15:46:46.760785Z"},{"id":"CLSA-2026-1773274566","title":"TuxCare security update for mysql2 (3 CVEs)","description":"TuxCare rebuilt mysql2 to address 3 CVEs. Fixed in 2.3.3-tuxcare.2.","status":"published","published":"2026-08-04T14:52:12Z","modified":"2026-10-15T09:47:28.784236544Z","updated_at":"2026-11-02T15:43:43.621843Z"},{"id":"ROOT-APP-NPM-CVE-2024-21508","title":"CVE-2024-21508 in mysql2 - Patched by Root","description":"Root has patched CVE-2024-21508 in the mysql2 package for Root:npm. Multiple fixed versions available.","status":"published","published":"2026-09-11T12:50:21Z","modified":"2026-09-11T13:15:04.386291478Z","updated_at":"2026-11-02T15:53:27.362922Z"}]}}
