{"id":"CVE-2024-21512","aliases":["CLSA-2026-1773274566","EUVD-2024-1718","GHSA-pmh2-wpjm-fj45","ROOT-APP-NPM-CVE-2024-21512"],"status":"published","title":"mysql2 vulnerable to Prototype Pollution","description":"Versions of the package mysql2 before 3.9.8 are vulnerable to Prototype Pollution due to improper user input sanitization passed to fields and tables when using nestTables.","severity":{"version":"3.1","score":8.2,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L/E:P","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-12","score":0.03139,"percentile":0.88085,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-1321"],"published":"2024-05-29T05:00:01Z","modified":"2026-10-28T02:30:38Z","fixes":[{"ecosystem":"npm","package":"mysql2","fixed_in":["3.9.8"],"sources":["ghsa","osv"]},{"ecosystem":"Root:npm","package":"mysql2","fixed_in":["3.9.7-aikido.2","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.1","3.7.1-aikido.2","3.7.1-aikido.3","3.9.8-aikido.1"],"sources":["osv"]},{"ecosystem":"Root:npm","package":"@rootio/mysql2","fixed_in":["2.3.3-root.io.2","3.9.7-root.io.1","3.9.7-root.io.2","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.1","3.7.1-root.io.2","3.7.1-root.io.3","3.9.8-root.io.1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"mysql2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.9.8"}]}]},{"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.8"}]}]},{"source":"osv","ecosystem":"Root:npm","package":"mysql2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.9.7-aikido.2"},{"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.1"},{"fixed":"3.7.1-aikido.2"},{"fixed":"3.7.1-aikido.3"},{"fixed":"3.9.8-aikido.1"}]}]},{"source":"osv","ecosystem":"Root:npm","package":"@rootio/mysql2","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.3.3-root.io.2"},{"fixed":"3.9.7-root.io.1"},{"fixed":"3.9.7-root.io.2"},{"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.1"},{"fixed":"3.7.1-root.io.2"},{"fixed":"3.7.1-root.io.3"},{"fixed":"3.9.8-root.io.1"}]}]}],"products":[{"vendor":"mysql2","product":"mysql2"}],"references":[{"url":"https://security.snyk.io/vuln/SNYK-JS-MYSQL2-6861580","tags":["x_transferred","web"]},{"url":"https://security.snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-7176010","tags":["x_transferred","web"]},{"url":"https://gist.github.com/domdomi3/e9f0f9b9b1ed6bfbbc0bea87c5ca1e4a","tags":["x_transferred","web"]},{"url":"https://github.com/sidorares/node-mysql2/pull/2702","tags":["x_transferred","fix","web"]},{"url":"https://github.com/sidorares/node-mysql2/commit/efe3db527a2c94a63c2d14045baba8dfefe922bc","tags":["x_transferred","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-21512","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-pmh2-wpjm-fj45"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/21xxx/CVE-2024-21512.json","tags":["advisory"]},{"url":"https://github.com/sidorares/node-mysql2","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2024-21512","description":"Versions of the package mysql2 before 3.9.8 are vulnerable to Prototype Pollution due to improper user input sanitization passed to fields and tables when using nestTables.","status":"published","published":"2024-05-29T05:00:01.515Z","modified":"2024-08-01T22:20:40.9Z","cvss":[{"version":"3.1","score":8.2,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L/E:P","level":"high","assessor":"cna"}],"cwes":["CWE-1321"],"updated_at":"2026-11-02T14:34:04.681315Z"}],"euvd":[{"id":"EUVD-2024-1718","description":"Versions of the package mysql2 before 3.9.8 are vulnerable to Prototype Pollution due to improper user input sanitization passed to fields and tables when using nestTables.","status":"published","published":"2024-05-29T05:00:01Z","modified":"2024-08-01T22:20:40Z","cvss":[{"version":"3.1","score":8.2,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L/E:P","level":"high"}],"updated_at":"2026-11-03T03:50:29.983832Z"}],"ghsa":[{"id":"GHSA-pmh2-wpjm-fj45","title":"mysql2 vulnerable to Prototype Pollution","description":"Versions of the package mysql2 before 3.9.8 are vulnerable to Prototype Pollution due to improper user input sanitization passed to fields and tables when using nestTables.","status":"published","published":"2024-05-30T18:34:32Z","modified":"2024-06-06T16:49:04Z","cvss":[{"version":"3.1","score":8.2,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L","level":"high"}],"cwes":["CWE-1321"],"updated_at":"2026-11-02T14:37:53.703286Z"}],"nvd":[{"id":"CVE-2024-21512","description":"Versions of the package mysql2 before 3.9.8 are vulnerable to Prototype Pollution due to improper user input sanitization passed to fields and tables when using nestTables.","status":"published","published":"2024-05-29T05:16:08.353Z","modified":"2026-06-17T07:09:38.93Z","cvss":[{"version":"3.1","score":8.2,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L","level":"high","assessor":"secondary"}],"cwes":["CWE-1321"],"updated_at":"2026-11-02T14:10:02.520903Z"}],"osv":[{"id":"CVE-2024-21512","description":"Versions of the package mysql2 before 3.9.8 are vulnerable to Prototype Pollution due to improper user input sanitization passed to fields and tables when using nestTables.","status":"published","published":"2024-05-29T05:00:01.515Z","modified":"2026-10-28T02:30:38.329614852Z","cvss":[{"version":"3.1","score":8.2,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L/E:P","level":"high"}],"cwes":["CWE-1321"],"updated_at":"2026-11-02T15:44:38.577405Z"},{"id":"GHSA-pmh2-wpjm-fj45","title":"mysql2 vulnerable to Prototype Pollution","description":"Versions of the package mysql2 before 3.9.8 are vulnerable to Prototype Pollution due to improper user input sanitization passed to fields and tables when using nestTables.","status":"published","published":"2024-05-30T18:34:32Z","modified":"2026-09-10T03:49:18.750717416Z","cvss":[{"version":"3.1","score":8.2,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L","level":"high"}],"cwes":["CWE-1321"],"updated_at":"2026-11-02T15:46:53.244788Z"},{"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-21512","title":"CVE-2024-21512 in mysql2 - Patched by Root","description":"Root has patched CVE-2024-21512 in the mysql2 package for Root:npm. Multiple fixed versions available.","status":"published","published":"2026-09-14T11:28:35Z","modified":"2026-09-14T12:15:04.059888376Z","updated_at":"2026-11-02T15:53:27.362922Z"}]}}
