Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2026-27959— Koa has Host Header Injection via `ctx.hostname`

Quick assessment

Affected
koajs koa
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

koa是Koa.js开源的一个使用node.js表达性中间件。 koa 3.1.2之前版本和2.16.4之前版本存在输入验证错误漏洞,该漏洞源于对HTTP Host标头的解析不当,可能导致主机标头注入攻击。

CVSS 7.5 · High EPSS 0.53% · P44

Possible ATT&CK Techniques 2 AI

T1071.001 · Web Protocols T1071.004 · DNS

Affected Version Matrix 2

VendorProduct Version RangeStatus
koajs koa >= 3.0.0, < 3.1.2 affected
< 2.16.4 affected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-27959

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
Koa has Host Header Injection via `ctx.hostname`
Source: CVE Program / CVE List V5
Vulnerability Description
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.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Source: CVE Program / CVE List V5
Vulnerability Type
输入验证不恰当
Source: CVE Program / CVE List V5
Vulnerability Title
koa 输入验证错误漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
koa是Koa.js开源的一个使用node.js表达性中间件。 koa 3.1.2之前版本和2.16.4之前版本存在输入验证错误漏洞,该漏洞源于对HTTP Host标头的解析不当,可能导致主机标头注入攻击。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
koajs koa >= 3.0.0, < 3.1.2 -

II. Public POCs for CVE-2026-27959

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-27959

请登录查看更多情报信息。

Vendor Advisories for CVE-2026-27959 (1)

IV. Related Vulnerabilities

V. Comments for CVE-2026-27959

No comments yet


Leave a comment