# CVE-2025-25200: Koa has Inefficient Regular Expression Complexity

- Severity: Critical 9.2 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.88%, higher than 60% of CVEs (2026-12-01)
- Published: 2025-02-12T17:59:04.615Z
- Modified: 2026-06-17T09:00:28.320Z
- Also known as: GHSA-593f-38f6-jp5m
- Weaknesses: CWE-1333
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- koajs koa: < 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; before 0.21.2; from 1.0.0 before 1.7.1; from 2.0.0 before 2.15.4; 3.0.0
- koa (npm): from 2.0.0 before 2.15.4; from 3.0.0-alpha.0 before 3.0.0-alpha.3; from 1.0.0 before 1.7.1; before 0.21.2

## Every score

- GitHub_M: CVSS:4.0 9.2 Critical `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`
- GitHub: CVSS:4.0 Critical `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`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://github.com/koajs/koa/security/advisories/GHSA-593f-38f6-jp5m> (vendor-advisory, web)
- <https://github.com/koajs/koa/commit/5054af6e31ffd451a4151a1fe144cef6e5d0d83c> (patch, web)
- <https://github.com/koajs/koa/commit/5f294bb1c7c8d9c61904378d250439a321bffd32> (patch, web)
- <https://github.com/koajs/koa/commit/93fe903fc966635a991bcf890cfc3427d33a1a08> (patch, web)
- <https://github.com/koajs/koa/blob/master/lib/request.js#L259> (product)
- <https://github.com/koajs/koa/blob/master/lib/request.js#L404> (product)
- <https://github.com/koajs/koa/releases/tag/2.15.4> (release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-25200> (advisory)
- <https://github.com/koajs/koa> (package)

## Sources

- CVE List: [CVE-2025-25200](https://www.cve.org/CVERecord?id=CVE-2025-25200), CVE Terms of Use, modified 2025-02-12
- GitHub Advisory Database: [GHSA-593f-38f6-jp5m](https://github.com/advisories/GHSA-593f-38f6-jp5m), CC-BY-4.0, modified 2025-02-12
- NVD: [CVE-2025-25200](https://nvd.nist.gov/vuln/detail/CVE-2025-25200), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-25200 · Whole record: https://cve.day/CVE-2025-25200.json · Rebuilt by cve.day 2026-11-25T22:58:54.051Z
