GHSA-xffm-g5w8-qvg7 @eslint/plugin-kit is vulnerable to Regular Expression Denial of Service attacks through ConfigCommentParser
Attackers can cause denial of service via high CPU usage by submitting crafted input to the ConfigCommentParser in the ESLint plugin kit library.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is GHSA-xffm-g5w8-qvg7?
GHSA-xffm-g5w8-qvg7 is a denial of service vulnerability in @eslint/plugin-kit, published on 18 Jul 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
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 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
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/[email protected]` 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.
Which versions are affected by GHSA-xffm-g5w8-qvg7?
2 open source packages ship an affected version, including @eslint/plugin-kit.
| Package | Affected | Fixed in |
|---|---|---|
@eslint/plugin-kit npm | All versions | 0.3.4 |
@eslint/plugin-kit npm | All versions | 0.3.4 |
How do I fix GHSA-xffm-g5w8-qvg7?
Upgrade @eslint/plugin-kit to 0.3.4 or later.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is GHSA-xffm-g5w8-qvg7 being exploited?
There is no known exploitation of GHSA-xffm-g5w8-qvg7 in the wild and no public exploit code.