CVE-2024-21508mysql2
Critical 9.8 No auth needed
Follow: this CVE · mysql2 · mysql2 We alert you by email or Slack (account required).
- Priority
- 74
- CVSS 3.1
- 9.8
- EPSS
- 3.5% probability of exploitation in 30 days · percentile 90
- Auth required
- No
- Published
- Apr 11, 2024
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-94
- SSVC (CISA)
- Exploitation: none · Automatable: yes · Technical impact: total
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
What happens
Versions of the package mysql2 before 3.9.4 are vulnerable to Remote Code Execution (RCE) via the readCodeFor function due to improper validation of the supportBigNumbers and bigNumberStrings values.
What to do
- Apply the vendor's security update for mysql2.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | mysql2 |
< 3.9.4 |
3.9.4 |
npm install mysql2@3.9.4 |
Per OSV / GitHub Advisories (GHSA-fpw7-j2hg-69v5). Check the version in your lockfile before upgrading.
Affected products
- mysql2 · mysql2
As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.
Official sources
References
Links published by the sources. Open them with care.