Mend.io Vulnerability Database
The largest open source vulnerability database
What is a Vulnerability ID?
New vulnerability? Tell us about it!
CVE-2026-27959
February 26, 2026
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" for URL generation, password reset links, email verification URLs, or routing decisions are vulnerable to Host header injection attacks. Versions 3.1.2 and 2.16.4 fix the issue.
Affected Packages
https://github.com/koajs/koa.git (GITHUB):
Affected version(s) >=v3.0.0 <v3.1.2
Fix Suggestion:
Update to version v3.1.2
https://github.com/koajs/koa.git (GITHUB):
Affected version(s) >=v2.16.0 <v2.16.4
Fix Suggestion:
Update to version v2.16.4
koa (NPM):
Affected version(s) >=0.0.1 <2.16.4
Fix Suggestion:
Update to version 2.16.4
koa (NPM):
Affected version(s) >=3.0.0 <3.1.2
Fix Suggestion:
Update to version 3.1.2
Do you need more information?
Contact Us
CVSS v4
Base Score:
8.7
Attack Vector
NETWORK
Attack Complexity
LOW
Attack Requirements
NONE
Privileges Required
NONE
User Interaction
NONE
Vulnerable System Confidentiality
NONE
Vulnerable System Integrity
HIGH
Vulnerable System Availability
NONE
Subsequent System Confidentiality
NONE
Subsequent System Integrity
NONE
Subsequent System Availability
NONE
CVSS v3
Base Score:
7.5
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
HIGH
Availability
NONE
Weakness Type (CWE)
Improper Input Validation
Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
EPSS
Base Score:
0.12