GHSA-xffm-g5w8-qvg7: @eslint/plugin kit Denial of Service Vulnerability

LOW
CWE-1333
Published
Advisory Summary

GHSA-xffm-g5w8-qvg7 is a LOW denial of service vulnerability (CWE-1333: Inefficient Regular Expression Complexity) affecting @eslint/plugin kit libraries in the npm ecosystem. The issue involves @eslint/plugin-kit is vulnerable to regular expression denial of service attacks through configcommentparser. Remediation is available by upgrading affected packages to version 0.3.4.

GHSA-xffm-g5w8-qvg7 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-xffm-g5w8-qvg7
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-1333: Inefficient Regular Expression Complexity
Affected Product @eslint/plugin kit
Package Ecosystem npm
Published Date
Last Updated

How to Fix GHSA-xffm-g5w8-qvg7

To remediate this vulnerability, upgrade all affected @eslint/plugin kit dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@eslint/plugin-kit fixed: 0.3.4
npm install @eslint/plugin-kit@0.3.4
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @eslint/plugin-kit

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-xffm-g5w8-qvg7, inspect your project dependencies using npm:

npm ls @eslint/plugin-kit

Analyze the terminal output to locate any version of @eslint/plugin kit in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.3.4), your application is affected.

Note: The npm ls @eslint/plugin-kit command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-1333: Inefficient Regular Expression Complexity, where the product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential. In @eslint/plugin kit, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary The `ConfigCommentParser#parseJSONLikeConfig` API is vulnerable to a Regular Expression Denial of Service (ReDoS) attack in its only argument. ### Details The regular expression at [packages/plugin-kit/src/config-comment-parser.js:158](https://github.com/eslint/rewrite/blob/bd4bf23c59f0e4886df671cdebd5abaeb1e0d916/packages/plugin-kit/src/config-comment-parser.js#L158) is vulnerable to a quadratic runtime attack because the grouped expression is not anchored. This can be solved by prepending the regular expression with `[^-a-zA-Z0-9/]`. ### PoC ```javascript const { ConfigCommentParser } = require("@eslint/plugin-kit"); const str = `${"A".repeat(1000000)}?: 1 B: 2`; console.log("start") var parser = new ConfigCommentParser(); console.log(parser.parseJSONLikeConfig(str)); console.log("end") // run `npm i @eslint/plugin-kit@0.3.3` and `node attack.js` // then the program will stuck forever with high CPU usage ``` ### Impact This is a Regular Expression Denial of Service attack which may lead to blocking execution and high CPU usage.

GHSA-xffm-g5w8-qvg7 Affected @eslint/plugin kit Versions

1 component(s)
Fixed Versions:
0.3.4
Product / Package Ecosystem Affected Versions Fixed Version
@eslint/plugin-kit
npm
< 0.3.4
0.3.4

References

Frequently Asked Questions

What is GHSA-xffm-g5w8-qvg7?
GHSA-xffm-g5w8-qvg7 is a security vulnerability in @eslint/plugin kit involving @eslint/plugin-kit is vulnerable to Regular Expression Denial of Service attacks through ConfigCommentParser under CWE-1333: Inefficient Regular Expression Complexity.
Which @eslint/plugin kit versions are affected?
Affected versions include releases prior to 0.3.4 across affected packages: @eslint/plugin-kit.
What version fixes GHSA-xffm-g5w8-qvg7?
Upgrading to 0.3.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @eslint/plugin-kit affected?
Yes, @eslint/plugin-kit is affected in releases prior to 0.3.4. Upgrade your dependency to 0.3.4 or later.
What CWE is associated with GHSA-xffm-g5w8-qvg7?
GHSA-xffm-g5w8-qvg7 is classified under CWE-1333: Inefficient Regular Expression Complexity (The product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential.).
How can I check npm dependencies for GHSA-xffm-g5w8-qvg7?
Run the dependency tree command: 'npm ls @eslint/plugin-kit'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-xffm-g5w8-qvg7",
  "modified" : "2025-07-28T17:34:44Z",
  "published" : "2025-07-18T20:39:12Z",
  "aliases" : [ ],
  "summary" : "@eslint/plugin-kit is vulnerable to Regular Expression Denial of Service attacks through ConfigCommentParser",
  "details" : "### Summary\n\nThe `ConfigCommentParser#parseJSONLikeConfig` API is vulnerable to a Regular Expression Denial of Service (ReDoS) attack in its only argument.\n\n### Details\n\nThe regular expression at [packages/plugin-kit/src/config-comment-parser.js:158](https://github.com/eslint/rewrite/blob/bd4bf23c59f0e4886df671cdebd5abaeb1e0d916/packages/plugin-kit/src/config-comment-parser.js#L158) is vulnerable to a quadratic runtime attack because the grouped expression is not anchored. This can be solved by prepending the regular expression with `[^-a-zA-Z0-9/]`.\n\n### PoC\n\n```javascript\nconst { ConfigCommentParser } = require(\"@eslint/plugin-kit\");\n\nconst str = `${\"A\".repeat(1000000)}?: 1 B: 2`;\n\nconsole.log(\"start\")\nvar parser = new ConfigCommentParser();\nconsole.log(parser.parseJSONLikeConfig(str));\nconsole.log(\"end\")\n\n// run `npm i @eslint/plugin-kit@0.3.3` and `node attack.js`\n// then the program will stuck forever with high CPU usage\n```\n\n### Impact\n\nThis is a Regular Expression Denial of Service attack which may lead to blocking execution and high CPU usage.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@eslint/plugin-kit"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.3.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/eslint/rewrite/security/advisories/GHSA-xffm-g5w8-qvg7"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/eslint/rewrite/commit/b283f64099ad6c6b5043387c091691d21b387805"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/eslint/rewrite"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1333" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-07-18T20:39:12Z",
    "nvd_published_at" : null
  }
}