{"id":"CVE-2025-25200","published":"2025-02-12T17:59:04Z","modified":"2025-02-12T19:29:10Z","title":"Koa has Inefficient Regular Expression Complexity","vendor":"koajs","product":"koa","tier":"tail","description":{"text":"Koa is expressive middleware for Node.js using ES2017 async functions. Prior to versions 0.21.2, 1.7.1, 2.15.4, and 3.0.0-alpha.3, Koa uses an evil regex to parse the `X-Forwarded-Proto` and `X-Forwarded-Host` HTTP headers. This can be exploited to carry out a Denial-of-Service attack. Versions 0.21.2, 1.7.1, 2.15.4, and 3.0.0-alpha.3 fix the issue.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.2,"severity":"CRITICAL","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01271,"percentile":0.69834,"provenance":"source"},"cwes":[{"id":"CWE-1333","name":"Inefficient Regular Expression Complexity"}],"references":[{"url":"https://github.com/koajs/koa/security/advisories/GHSA-593f-38f6-jp5m","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/koajs/koa/commit/5054af6e31ffd451a4151a1fe144cef6e5d0d83c","tags":["x_refsource_MISC"]},{"url":"https://github.com/koajs/koa/commit/5f294bb1c7c8d9c61904378d250439a321bffd32","tags":["x_refsource_MISC"]},{"url":"https://github.com/koajs/koa/commit/93fe903fc966635a991bcf890cfc3427d33a1a08","tags":["x_refsource_MISC"]},{"url":"https://github.com/koajs/koa/blob/master/lib/request.js#L259","tags":["x_refsource_MISC"]},{"url":"https://github.com/koajs/koa/blob/master/lib/request.js#L404","tags":["x_refsource_MISC"]},{"url":"https://github.com/koajs/koa/releases/tag/2.15.4","tags":["x_refsource_MISC"]}],"priority":{"score":25.4,"factors":[{"name":"EPSS percentile","points":13.97},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":6.44}]},"exploitSources":{"pocGithub":{"count":2,"skipped":0,"earliest":"2026-03-22","earliestUrl":"https://github.com/dwictor0/PoC-CVE-2025-25200","repos":[{"name":"dwictor0/PoC-CVE-2025-25200","url":"https://github.com/dwictor0/PoC-CVE-2025-25200","stars":0,"created":"2026-03-22"},{"name":"gduma-phData/patch-CVE-2025-25200","url":"https://github.com/gduma-phData/patch-CVE-2025-25200","stars":0,"created":"2026-08-24"}]},"first":{"date":"2026-03-22","source":"PoC-in-GitHub","url":"https://github.com/dwictor0/PoC-CVE-2025-25200"},"provenance":"source"},"vendorSlug":"koajs","affectedVersions":[{"vendor":"koajs","product":"koa","versions":["< 0.21.2",">= 1.0.0, < 1.7.1",">= 2.0.0-alpha.1, < 2.15.4",">= 3.0.0-alpha.0, < < 3.0.0-alpha.3"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2025-02-12T18:33:35.286450Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"koa","vulnerableRanges":[">=2.0.0, <2.15.4",">=3.0.0-alpha.0, <3.0.0-alpha.3",">=1.0.0, <1.7.1","<0.21.2"],"patched":["2.15.4","3.0.0-alpha.3","1.7.1","0.21.2"],"from":["GHSA-593f-38f6-jp5m"],"provenance":"source"}],"summary":{"text":"The flaw is an inefficient (\"evil\") regular expression used by the koajs Koa middleware for Node.js to parse the X-Forwarded-Proto and X-Forwarded-Host HTTP headers. An unauthenticated remote attacker who can send HTTP requests to a Koa application can exploit it, without any user interaction or special configuration, to cause a denial of service.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:34:16Z"},"euvd":{"id":"EUVD-2025-4086","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-koajs-koa-cve-2025-25200","children":[{"from":"CVE-2025-25200","to":"CVE-2026-27959","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["lib/request.js"],"commits":["https://github.com/koajs/koa/commit/5054af6e31ffd451a4151a1fe144cef6e5d0d83c","https://github.com/koajs/koa/commit/5f294bb1c7c8d9c61904378d250439a321bffd32","https://github.com/koajs/koa/commit/55ab9bab044ead4e82c70a30a4f9dc0fc9c1b6df","https://github.com/koajs/koa/commit/b76ddc01fdb703e51652b0fd131d16394cadcfeb"],"basis":"rarely changed file"}]}],"packageHistory":[{"cve":"CVE-2025-25200","published":"2025-02-12","fixed":"3.0.0-alpha.3","kev":false},{"cve":"CVE-2025-32379","published":"2025-04-09","fixed":"3.0.0-alpha.5","kev":false,"link":{"from":"CVE-2025-25200","to":"CVE-2025-32379","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:koa","fromFixed":"3.0.0-alpha.3","toFixed":"3.0.0-alpha.5","daysApart":56},{"kind":"version-step","provenance":"source","package":"npm:koa","fromFixed":"2.15.4","toFixed":"2.16.1","daysApart":56}]}},{"cve":"CVE-2025-8129","published":"2025-07-25","fixed":"3.0.1","kev":false},{"cve":"CVE-2025-62595","published":"2025-10-21","fixed":"3.0.3","kev":false}],"package":"npm:koa"}}