Security Digest · Vulnerability record
CVE-2025-25200: Inefficient Regular Expression Complexity in koa
Koa is expressive middleware for Node.js using ES2017 async functions.
CVSS 9.2 Critical EPSS 0.8% · p57
Should you act?
Critical and remotely reachable
No known exploitation yet, but it is network-reachable without credentials. This signal is computed from CISA KEV, EPSS and CVSS data; it is not an editorial verdict.
- No confirmed exploitation. It is not in CISA’s KEV catalog and CISA’s SSVC assessment records no known exploitation. That can change quickly after a public write-up; re-check if you are affected.
- EPSS 0.8%, percentile 57: FIRST’s model estimates a 0.8% chance of exploitation activity in the next 30 days, higher than 57% of all scored CVEs (moderate). EPSS is a probability, not a verdict.
- Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
- Only applies if your dependency tree includes
koa(npm) >= 2.0.0, < 2.15.4, fixed in 2.15.4;koa(npm) >= 3.0.0-alpha.0, < 3.0.0-alpha.3, fixed in 3.0.0-alpha.3;koa(npm) >= 1.0.0, < 1.7.1, fixed in 1.7.1;koa(npm) < 0.21.2, fixed in 0.21.2. Check your lockfile, including transitive dependencies.
What it is
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.
From the GitHub advisory
Summary 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.
PoC
Coming soon.
Impact This is a Regex Denial-of-Service attack and causes memory exhaustion. The regex should be improved and empty values should not be allowed.
Weakness type: CWE-1333.
Product: koa (npm) · Assigned by: GitHub_M · Published: 2025-02-12
Affected and fixed versions
| Ecosystem | Package | Vulnerable | First fixed |
|---|---|---|---|
| npm | koa | >= 2.0.0, < 2.15.4 | 2.15.4 |
| npm | koa | >= 3.0.0-alpha.0, < 3.0.0-alpha.3 | 3.0.0-alpha.3 |
| npm | koa | >= 1.0.0, < 1.7.1 | 1.7.1 |
| npm | koa | < 0.21.2 | 0.21.2 |
| Vendor | Product | Affected versions (per CVE record) |
|---|---|---|
| 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 |
Severity scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_M | 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 | 4.0 | 9.2 | 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 |
- Attack vector: network (remotely reachable)
- Attack complexity: low
- Attack requirements: none
- Privileges required: none (no login)
- User interaction: none
CVSS measures how bad a flaw is if exploited, not how likely exploitation is. Read it next to the exploitation data below.
Exploitation and urgency
- CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
- CISA SSVC assessment: exploitation none, automatable no, technical impact partial.
- FIRST EPSS (model of 2026-10-21): 0.84% probability of exploitation activity in the next 30 days; percentile 57.
Timeline
- — CVE record last updated
- — CVE record published by GitHub_M
- — GitHub-reviewed advisory GHSA-593f-38f6-jp5m published (critical)
Sources and references
Original sources first. Version and fix details should always be confirmed against the vendor or project advisory.
Vulnerability records
- GitHub Advisory GHSA-593f-38f6-jp5m github.com
- CVE.org record CVE-2025-25200 cve.org
- NVD entry CVE-2025-25200 nvd.nist.gov
Other references from the CVE record and advisory
- github.com github.com
- github.com github.com
- github.com github.com
- github.com github.com
- github.com github.com
- github.com github.com
- github.com github.com