Vulnerability in Koajs Koa
CVE-2025-25200
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.
Vulnerability class: ReDoS (Regular Expression Denial of Service)
Published · last modified .
CVSS v3 metric
CVSS v3 base score 7.5 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
EPSS exploit prediction
EPSS 0.008, 58.5th percentile (scored ); unchanged over 30 days. About EPSS.
Affected products
- Koajs Koa — versions >= 2.0.0-alpha.1, < 2.15.4, >= 1.0.0, < 1.7.1, < 0.21.2
Weakness classification (CWE)
Public exploits and proof-of-concept code
2 public repositories with exploit or proof-of-concept code for this CVE:
- gduma-phData/patch-CVE-2025-25200 (last pushed 2026-08-24): Patch: SQL injection in pg_dump (PostgreSQL)
- dwictor0/PoC-CVE-2025-25200 (last pushed 2026-03-23): ReDoS explorando backtracking em regex, resultando em consumo excessivo de CPU e negação de serviço (DoS) em aplicações Node.js.
Also mentioned in 4 other repositories (ARPSyndicate/cve-scores, Motivesoft/vscode-pgn-viewer, Motivesoft/vscode-weather-status, …). These reference the CVE in a list, notes or a scanner and are not exploit code for it.
References
- https://github.com/koajs/koa/security/advisories/GHSA-593f-38f6-jp5m (Vendor Advisory)
- https://github.com/koajs/koa/commit/5054af6e31ffd451a4151a1fe144cef6e5d0d83c (Patch)
- https://github.com/koajs/koa/commit/5f294bb1c7c8d9c61904378d250439a321bffd32 (Patch)
- https://github.com/koajs/koa/commit/93fe903fc966635a991bcf890cfc3427d33a1a08 (Patch)
- 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)
This CVE has public exploit evidence. See the latest CVEs with public exploits.