CVE-2024-21511: MYSQL2

Critical severity, CVSS 9.8. EPSS: 1% chance of exploitation in the next 30 days.

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.

Affected products

  • MYSQL2 MYSQL2: before 3.9.7 (fixed in 3.9.7)

Published 2024-04-23. Last modified 2026-06-17.