Code injection in mysql2
Priority MEDIUM 54CWE-94Published · Updated
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-94.
Summary
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.
Why it matters now
Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.02554 85th percentileScored 2026-11-07
Fix Fixed mysql2: 3.9.4mysql2 (npm): 3.9.4
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | mysql2 | before 3.9.4 | 3.9.4 | Patch available | CNA |
| — | mysql2 (npm) | before 3.9.4 | 3.9.4 | Patch available | GHSA-fpw7-j2hg-69v5 |
- mysql2 Vendor— Affected before 3.9.4 Fixed in 3.9.4 Patch available CNA
- mysql2 (npm) Vendor— Affected before 3.9.4 Fixed in 3.9.4 Patch available GHSA-fpw7-j2hg-69v5
CPE names CISA-ADP · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:mysql2:mysql2:-:*:*:*:*:*:*:* | not specified by CISA-ADP | — | — |
- cpe:2.3:a:mysql2:mysql2:-:*:*:*:*:*:*:* Versions not specified by CISA-ADP — ·—
Remediation
- Fix · CNA mysql2 Fixed in 3.9.4
- Fix · GHSA-fpw7-j2hg-69v5 mysql2 (npm) Fixed in 3.9.4 Advisory →
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
Not affected: 1 product
- Red Hat Developer Hub 1
Timeline
- 2026-10-02 Threatist record created from CVE-2024-21508
- 2026-10-03 Alias added: GHSA-fpw7-j2hg-69v5
- 2026-10-27 Affected versions changed · Red Hat
References
Other 7
- https://blog.slonser.info/posts/mysql2-attacker-configuration/
- https://github.com/sidorares/node-mysql2/blob/1609b5393516d72a4ae47196837317fbe75e0c13/lib/parsers/text_parser.js%23L14C10-L14C21
- https://github.com/sidorares/node-mysql2/pull/2572
- https://github.com/sidorares/node-mysql2/commit/74abf9ef94d76114d9a09415e28b496522a94805
- https://github.com/sidorares/node-mysql2/releases/tag/v3.9.4
- https://blog.slonser.info/posts/mysql2-attacker-configuration
- https://github.com/sidorares/node-mysql2
Sources
- CVE-2024-21508 · CVE Program
- CVE-2024-21508 · NVD
- FIRST EPSS
- GHSA-fpw7-j2hg-69v5 · GitHub Advisory Database · CC BY 4.0
- CVE-2024-21508 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences