{"id":"GHSA-4rch-2fh8-94vw","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.","aliases":["CVE-2024-21511"],"modified":"2026-09-10T03:50:11.169102793Z","published":"2024-04-23T06:30:47Z","database_specific":{"nvd_published_at":"2024-04-23T05:15:48Z","cwe_ids":["CWE-94"],"severity":"CRITICAL","github_reviewed":true,"github_reviewed_at":"2024-04-23T20:50:56Z"},"references":[{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-21511"},{"type":"WEB","url":"https://github.com/sidorares/node-mysql2/pull/2608"},{"type":"WEB","url":"https://github.com/sidorares/node-mysql2/commit/7d4b098c7e29d5a6cb9eac2633bfcc2f0f1db713"},{"type":"PACKAGE","url":"https://github.com/sidorares/node-mysql2"},{"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"}],"affected":[{"package":{"name":"mysql2","ecosystem":"npm","purl":"pkg:npm/mysql2"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"3.9.7"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/04/GHSA-4rch-2fh8-94vw/GHSA-4rch-2fh8-94vw.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"}]}