{"id":"CVE-2025-25200","aliases":["CVE-2025-25200","GHSA-593f-38f6-jp5m"],"related":[],"kind":"vulnerability","state":"published","title":"Koa has Inefficient Regular Expression Complexity","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"en","text":"### Summary\nKoa 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.\n\n### PoC\n\nComing soon.\n\n### Impact\nThis is a Regex Denial-of-Service attack and causes memory exhaustion. The regex should be improved and empty values should not be allowed.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Koa es un middleware expresivo para Node.js que utiliza funciones asincrónicas ES2017. En versiones anteriores a las 0.21.2, 1.7.1, 2.15.4 y 3.0.0-alpha.3, Koa utiliza una expresión regular maliciosa para analizar los encabezados HTTP `X-Forwarded-Proto` y `X-Forwarded-Host`. Esto se puede aprovechar para llevar a cabo un ataque de denegación de servicio. Las versiones 0.21.2, 1.7.1, 2.15.4 y 3.0.0-alpha.3 solucionan el problema.","source":"nvd"}],"published":"2025-02-12T17:59:04.615Z","modified":"2026-06-17T09:00:28.320Z","severity":{"scorer":"GitHub_M","scheme":"CVSS: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","score":9.2,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS: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","score":9.2,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS: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","rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-1333"],"affected":[{"ranges":[{"version":"< 0.21.2","status":"affected"},{"version":">= 1.0.0, < 1.7.1","status":"affected"},{"version":">= 2.0.0-alpha.1, < 2.15.4","status":"affected"},{"version":">= 3.0.0-alpha.0, < < 3.0.0-alpha.3","status":"affected"}],"vendor":"koajs","product":"koa","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"2.0.0","status":"affected","fixed":"2.15.4"}],"ecosystem":"npm","package":"koa","purl":"pkg:npm/koa","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"3.0.0-alpha.0","status":"affected","fixed":"3.0.0-alpha.3"}],"ecosystem":"npm","package":"koa","purl":"pkg:npm/koa","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"1.0.0","status":"affected","fixed":"1.7.1"}],"ecosystem":"npm","package":"koa","purl":"pkg:npm/koa","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.21.2"}],"ecosystem":"npm","package":"koa","purl":"pkg:npm/koa","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"0.21.2"},{"status":"affected","introduced":"1.0.0","fixed":"1.7.1"},{"status":"affected","introduced":"2.0.0","fixed":"2.15.4"},{"status":"affected","version":"3.0.0"},{"status":"affected","version":"3.0.0"},{"status":"affected","version":"3.0.0"}],"vendor":"koajs","product":"koa","cpe":"cpe:2.3:a:koajs:koa:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/koajs/koa/security/advisories/GHSA-593f-38f6-jp5m","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/koajs/koa/commit/5054af6e31ffd451a4151a1fe144cef6e5d0d83c","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/koajs/koa/commit/5f294bb1c7c8d9c61904378d250439a321bffd32","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/koajs/koa/commit/93fe903fc966635a991bcf890cfc3427d33a1a08","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/koajs/koa/blob/master/lib/request.js#L259","tags":["product","x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/koajs/koa/blob/master/lib/request.js#L404","tags":["product","x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/koajs/koa/releases/tag/2.15.4","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-25200","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/koajs/koa","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-02-12T18:33:35.286Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-25200","url":"https://www.cve.org/CVERecord?id=CVE-2025-25200","licence":"CVE Terms of Use","modified":"2025-02-12T19:29:10.232Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-593f-38f6-jp5m","url":"https://github.com/advisories/GHSA-593f-38f6-jp5m","licence":"CC-BY-4.0","modified":"2025-02-12T19:27:07.225Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-25200","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-25200","licence":"Public domain","modified":"2026-06-17T09:00:28.320Z"}],"updatedAt":"2026-11-25T22:58:54.051Z","epss":{"score":0.00877,"percentile":0.60084,"date":"2026-12-01T12:00:22.000Z"}}