Koa
Koa has Inefficient Regular Expression Complexity
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.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 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
Fixed in 0.21.2, 1.7.1, 2.15.4, 3.0.0-alpha.3
Mitigation
Upgrade koa to 0.21.2 or 1.7.1 or 2.15.4 or 3.0.0-alpha.3 or later.
References
- Vendor advisory github.com/koajs/koa/security/advisories/GHSA-…
- Patch github.com/koajs/koa/commit/5054af6e31ffd451a4…
- Patch github.com/koajs/koa/commit/5f294bb1c7c8d9c619…
2 more
Timeline
Days relative to CVE publicationFirst public PoC 1.1 years after publication; not in CISA KEV. First PoC: dwictor0/PoC-CVE-2025-25200 (created 22 Mar 2026, found by us: backfilled).
PoC repositories
Found on GitHub.1 PoCs · 1 informational
PoCs 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| dwictor0/PoC-CVE-2025-25200 | 22 Mar 2026 +1.1 y | 0 | PoC |
Informational 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| gduma-phData/patch-CVE-2025-25200 | 24 Aug 2026 +1.5 y | 0 | Informational · detection |
Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.
PoC characteristics
What to hunt for in your logs · from 1 PoC repoGET /
- Key headers
X-Forwarded-For: {var}!- Ports
- 3000
- Seen in
- 1 repo: dwictor0/PoC-CVE-2025-25200
- Evidence
- dwictor0/PoC-CVE-2025-25200/exploit/main.go:20
Regex
Generated from PoC characteristics; not yet reviewed. Matches the request path and query.
(?i)^/(?:[?#].*)?$
Suricata
Template generated from PoC characteristics. Review before deploying.
alert http any any -> $HOME_NET [3000] (msg:"GG PoC-Monitor CVE-2025-25200 koajs koa exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.header_names; content:"X-Forwarded-For"; nocase; reference:url,poc.griffinguard.io/cve/CVE-2025-25200; classtype:web-application-attack; sid:9825692; rev:1;)
Sigma
Template generated from PoC characteristics. Review before deploying.
title: koajs koa exploit attempt (CVE-2025-25200)
id: gg-pocmon-cve-2025-25200-9825692
status: experimental
description: Request pattern taken from public PoCs for CVE-2025-25200. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2025-25200
logsource:
category: webserver
detection:
selection:
cs-method: GET
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2025.25200