PT-2026-22104 · Koa · Koa

·

CVE-2026-27959

·

Published

2026-02-25

·

Updated

2026-06-24

CVSS v3.1

8.2

High

VectorAV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N
Name of the Vulnerable Software and Affected Versions Koa versions prior to 3.1.2 Koa versions prior to 2.16.4
Description Koa middleware for Node.js, using ES2017 async functions, has an issue where the ctx.hostname API improperly parses the HTTP Host header. The parsing does not validate input against RFC 3986 hostname syntax, specifically failing to properly handle colons. A malformed Host header containing an @ symbol can result in ctx.hostname returning an attacker-controlled value, such as evil[.]com. Applications utilizing ctx.hostname for URL generation, password reset links, email verification URLs, or routing decisions are susceptible to Host header injection attacks. The ctx.hostname API endpoint is vulnerable. The Host header is a vulnerable parameter.
Recommendations Update to Koa version 3.1.2 or later. Update to Koa version 2.16.4 or later.

Exploit

Fix

DoS

Special Elements Injection

RCE

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

BDU:2026-09467
CVE-2026-27959
GHSA-7GCC-R8M5-44QM

Affected Products

Koa