CVE-2024-21511 json
MySQL2 for Node Arbitrary Code Injection
published 2024-04-23 2 y ago modified 2026-09-10 1 mo ago also EUVD-2024-1092 , GHSA-4rch-2fh8-94vw
- cvss
- 9.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.0%
- EPSS 1.0% chance of exploitation in 30 days, percentile 64%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- npm mysql2 3.9.7
- n/a mysql2 3.9.7
- mysql2 mysql2 3.9.7
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2024-21511 updated cvss 9.8
mysql2: Arbitrary Code Injection due to improper sanitization of the timezone parameter
-
Red Hat Developer Hub 1 rhdh/rhdh-hub-rhel9, rhdh-operator-containernot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- yes
- Technical impact
- total
- Assessed
- 2 y ago
Exploit prediction
1.03% chance of exploitation in the next 30 days, higher than 64% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P |
| GitHub | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| CNA | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | mysql2 | <3.9.7 |
3.9.7 |
Affected products
- n/a mysql2
- mysql2 mysql2
Classification
- Weakness
-
- CWE-94 Improper Control of Generation of Code
References
-
github.com
/sidorares/node-mysql2/pull/2608
web
-
github.com
/sidorares/node-mysql2/commit/7d4b098c7e29d5a6cb9eac2633bfcc2f0f1db713
web
-
security.snyk.io
/vuln/SNYK-JS-MYSQL2-6670046
web
-
github.com
/sidorares/node-mysql2/releases/tag/v3.9.7
web
-
nvd.nist.gov
/vuln/detail/CVE-2024-21511
advisory
-
github.com
/sidorares/node-mysql2
package
Sources
- CVE List CVE-2024-21511
- GitHub Advisory GHSA-4rch-2fh8-94vw
- NVD CVE-2024-21511
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.