Cyber Resilience

CVE-2024-21508

CriticalRCE

Published: 11 April 2024

Published
11 April 2024
Modified
15 April 2026
KEV Added
Patch
CVSS Score v3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS Score 0.4619 97.7th percentile
Risk Priority 47 60% EPSS · 20% KEV · 20% CVSS

Summary

CVE-2024-21508 is a critical-severity Code Injection (CWE-94) vulnerability in Slonser (inferred from references). Its CVSS base score is 9.8 (Critical).

Operationally, ranked in the top 2.3% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog.

Deeper analysis

Versions of the mysql2 Node.js package before 3.9.4 contain a remote code execution vulnerability in the readCodeFor function inside the text parser. The flaw stems from missing validation of the supportBigNumbers and bigNumberStrings configuration values, which are passed directly into code generation and allow an attacker to inject arbitrary JavaScript. The issue is tracked as CWE-94 and carries a CVSS 3.1 score of 9.8.

An unauthenticated network attacker can supply malicious configuration values when the vulnerable package connects to or processes responses from a MySQL-compatible server. Successful exploitation results in arbitrary code execution on the client application with the privileges of the Node.js process, enabling full compromise of confidentiality, integrity, and availability.

The project addressed the flaw in release 3.9.4; the corresponding commit and pull request restrict the handling of the affected options and prevent unsafe code generation. Administrators are advised to upgrade immediately and to avoid exposing untrusted connection or result-set configuration parameters.

EPSS for the CVE rose from a low baseline to a peak of 0.5559 on 2025-12-11 before receding to the current value of 0.4619, indicating that meaningful exploitation interest developed after public disclosure.

EU & UK References

Vulnerability details

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.

CWE(s)

Related Threats

No named actor attribution yet. ATT&CK technique mapping in progress for this CVE.

Affected Assets

Slonser
inferred from references and description; NVD did not file a CPE for this CVE

Mitigating Controls

Likely Mitigating Controls AI

Per-CVE control mapping for this CVE has not run yet; the list below is derived from the weakness types (CWEs) cited in the NVD entry.

addresses: CWE-94

Makes persistent code injection into loaded programs impossible when the executable image itself resides on hardware-protected read-only media.

addresses: CWE-94

Dynamically generated code can be produced and executed inside the isolated chamber, preventing host compromise from code-injection payloads.

addresses: CWE-94

Validates inputs used in dynamic code generation to block injected directives.

addresses: CWE-94

Directly prevents execution of attacker-supplied code written into data memory regions.

References