Every CVE Search/ Get API key

CVE-2024-21508

mysql2 Remote Code Execution (RCE) via the readCodeFor function

9.8 CriticalFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

2.55%Up 2.5 points since Apr 11, 2024
90%50%10%1%

What each source reports

CVE List Score used 9.8

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.

Record
CVE-2024-21508
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P
Weakness
CWE-94
Updated
2026-11-02
EUVDEUVD-2024-1197 9.8

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.

Record
EUVD-2024-1197
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P
Updated
2026-11-03
GitHub AdvisoriesGHSA-fpw7-j2hg-69v5 9.8

mysql2 Remote Code Execution (RCE) via the readCodeFor function

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.

Record
GHSA-fpw7-j2hg-69v5
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-94
Updated
2026-11-02
NVD 9.8

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.

Record
CVE-2024-21508
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-94
Updated
2026-11-02
OSV 9.8

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.

Record
CVE-2024-21508
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P
Weakness
CWE-94
Updated
2026-11-02
OSVGHSA-fpw7-j2hg-69v5 9.8

mysql2 Remote Code Execution (RCE) via the readCodeFor function

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.

Record
GHSA-fpw7-j2hg-69v5
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-94
Updated
2026-11-02
OSVCLSA-2026-1773274566 No score

TuxCare security update for mysql2 (3 CVEs)

TuxCare rebuilt mysql2 to address 3 CVEs. Fixed in 2.3.3-tuxcare.2.

Record
CLSA-2026-1773274566
Updated
2026-11-02
OSVROOT-APP-NPM-CVE-2024-21508 No score

CVE-2024-21508 in mysql2 - Patched by Root

Root has patched CVE-2024-21508 in the mysql2 package for Root:npm. Multiple fixed versions available.

Record
ROOT-APP-NPM-CVE-2024-21508
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
mysql2
npm
before 3.9.4
3.9.4
mysql2
TuxCare:npm
From an advisory covering 3 CVEs
2.3.3-tuxcare.0 up to 2.3.3-tuxcare.2, plus listed versions
2.3.32.3.3-tuxcare.1
2.3.3-tuxcare.2
mysql2
Root:npm
before 2.3.3-aikido.3
2.3.3-aikido.33.7.1-aikido.43.9.2-aikido.13.9.2-aikido.22.3.3-aikido.43.7.1-aikido.23.7.1-aikido.3
@rootio/mysql2
Root:npm
before 2.3.3-root.io.2
2.3.3-root.io.22.3.3-root.io.12.3.3-root.io.33.7.1-root.io.43.9.2-root.io.13.9.2-root.io.22.3.3-root.io.43.7.1-root.io.23.7.1-root.io.3

History

History
RecordedChangedSources
affected, facts
aliases, publishedEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2024-21508 is a critical vulnerability (CVSS 9.8) in Mysql2, published April 11, 2024. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.55%, the 85th percentile. Fixed in mysql2 3.9.4.

References

Show 4 moreShow less
MoveEnter Open