{"id":"CVE-2024-21511","aliases":["GHSA-4rch-2fh8-94vw"],"url":"https://o3.security/vulnerability/CVE-2024-21511","summary":"MySQL2 for Node Arbitrary Code Injection","details":"Versions of the package mysql2 before 3.9.7 are vulnerable to Arbitrary Code Injection due to improper sanitization of the timezone parameter in the readCodeFor function by calling a native MySQL Server date/time function.","published":"2024-04-23T05:00:00.602Z","modified":"2026-07-15T01:49:02.427689824Z","cvss":{"score":9.8,"severity":"CRITICAL","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P"},"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"mysql2","fixedVersion":"3.9.7"}],"fix":{"url":"https://github.com/sidorares/node-mysql2/commit/7d4b098c7e29d5a6cb9eac2633bfcc2f0f1db713","label":"sidorares/node-mysql2@7d4b098"},"references":[{"type":"WEB","url":"https://github.com/sidorares/node-mysql2/releases/tag/v3.9.7"},{"type":"WEB","url":"https://security.snyk.io/vuln/SNYK-JS-MYSQL2-6670046"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/21xxx/CVE-2024-21511.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-21511"},{"type":"FIX","url":"https://github.com/sidorares/node-mysql2/commit/7d4b098c7e29d5a6cb9eac2633bfcc2f0f1db713"},{"type":"FIX","url":"https://github.com/sidorares/node-mysql2/pull/2608"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-07-15T01:49:02.427689824Z"}}