CVE-2025-25200Koajs Koa
Critical 9.2 No auth needed
Follow: this CVE · Koajs · Koajs Koa We alert you by email or Slack (account required).
- Priority
- 70
- CVSS 4.0
- 9.2
- EPSS
- —
- Auth required
- No
- Published
- Feb 12, 2025
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-1333
- SSVC (CISA)
- Exploitation: none · Automatable: no · Technical impact: partial
- 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
What happens
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.
What to do
- Apply the vendor's security update for Koa.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | koa |
≥ 2.0.0 < 2.15.4 |
2.15.4 |
npm install koa@2.15.4 |
| npm | koa |
≥ 3.0.0-alpha.0 < 3.0.0-alpha.3 |
3.0.0-alpha.3 |
npm install koa@3.0.0-alpha.3 |
| npm | koa |
≥ 1.0.0 < 1.7.1 |
1.7.1 |
npm install koa@1.7.1 |
| npm | koa |
< 0.21.2 |
0.21.2 |
npm install koa@0.21.2 |
Per OSV / GitHub Advisories (GHSA-593f-38f6-jp5m). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| koajs | koa | < 0.21.2 |
| koajs | koa | ≥ 1.0.0 < 1.7.1 |
| koajs | koa | ≥ 2.0.0 < 2.15.4 |
| koajs | koa | 3.0.0 |
| koajs | koa | 3.0.0 |
| koajs | koa | 3.0.0 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Product
- github.com Product
- github.com Patch
- github.com Patch
- github.com Patch
- github.com Release Notes
- github.com Vendor Advisory