CVE-2026-27959: Koa is middleware for Node.js using ES2017 async functions
CVE-2026-27959 is a high-severity flaw (CVSS 7.5) affecting koa. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
Koa is middleware for Node.js using ES2017 async functions. Prior to versions 3.1.2 and 2.16.4, Koa's `ctx.hostname` API performs naive parsing of the HTTP Host header, extracting everything before the first colon without validating the input conforms to RFC 3986 hostname syntax. When a malformed Host header containing a `@` symbol is received, `ctx.hostname` returns `evil[.]com` - an attacker-controlled value. Applications using `ctx.hostname` f
Why this priority
- High severity
- Public exploit reference
- Remotely exploitable, no login, no user action
A fixed release or distro patch exists.
Risk facts
| CVSS score | 7.5 (High) |
| Attack vector | Network (remote) |
| Attack complexity | Low |
| Privileges needed | None |
| User interaction | None |
| EPSS exploit chance | 0.4% (top 67%) |
| CISA exploited list | No |
| Weakness | CWE-20 |
| Published | 2026-02-26 |
| Last modified | 2026-07-15 |
Last updated 2026-07-15 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Am I affected?
Timeline
- Published CVE record published
- Updated Record last modified
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.
Quick answers
How do I fix CVE-2026-27959?
koa: upgrade to 2.16.4, 3.1.2. Exact commands for each OS are on this page.
Is CVE-2026-27959 being exploited?
CVE-2026-27959 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.
What does CVE-2026-27959 affect?
CVE-2026-27959 affects koa. Severity is high (CVSS 7.5). Koa is middleware for Node.js using ES2017 async functions. Prior to versions 3.1.2 and 2.16.4, Koa's `ctx.hostname` API performs naive parsing of the HTTP Host header, extracting everything before the first colon without validating the inp
How urgent is CVE-2026-27959?
Priority 45/100. High severity; Public exploit reference; Remotely exploitable, no login, no user action
Software pages
Related CVEs
- CVE-2025-62595 MEDIUM 4.3 UPGRADE Koa is expressive middleware for Node.js using ES2017 async functions
- CVE-2025-8129 LOW 3.5 UPGRADE A vulnerability, which was classified as problematic, was found in KoaJS Koa up to 3.0.0
- CVE-2025-32379 MEDIUM 5.0 UPGRADE Koa is expressive middleware for Node.js using ES2017 async functions
- CVE-2025-25200 HIGH 7.5 UPGRADE Koa is expressive middleware for Node.js using ES2017 async functions