CVE-2026-27959 json
Koa has Host Header Injection via `ctx.hostname`
published 2026-02-26 8 mo ago modified 2026-07-15 3 mo ago also GHSA-7gcc-r8m5-44qm , EUVD-2026-8816
- cvss
- 8.2
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.4%
- EPSS 0.4% chance of exploitation in 30 days, percentile 33%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- npm koa 2.16.4, 3.1.2
- Red Hat Red Hat OpenShift AI 2.25 1776742021, 1776742141
- Red Hat Red Hat OpenShift Container Platform 4.19 1775577192
- github.com/koajs/koa@55ab9ba commit
- github.com/koajs/koa@b76ddc0 commit
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2026-27959 updated cvss 8.2
koa: Koa: Host header injection vulnerability due to malformed HTTP Host header parsing
-
Red Hat Developer Hub 1 rhdh/rhdh-hub-rhel9affected: workaround, no fix planned “Will not fix”
-
Red Hat OpenShift AI (RHOAI) rhoai/odh-mod-arch-gen-ai-rhel9affected: workaround, no fix planned “Out of support scope”
-
Red Hat Self-service automation portal 2 ansible-automation-platform/automation-portalaffected: workaround, no fix available
-
Red Hat OpenShift AI 2.25 rhoai 1776742021, rhoai 1776742141fixed: vendor fix RHSA-2026:10184
-
Red Hat OpenShift Container Platform 4.19 openshift4 1775577192fixed: vendor fix RHSA-2026:7249
-
Red Hat OpenShift AI 2.25 rhoai 1775144403, rhoai 1776243157, rhoai 1776243163, rhoai 1776243192, rhoai 1776243217, rhoai 1776243229, +69 more Red Hat OpenShift Container Platform 4.19 openshift4 1775557242, openshift4 1775557245, openshift4 1775557255, openshift4 1775557257, openshift4 1775557260, openshift4 1775557261, +174 morenot affected: vulnerable code not present
-
Red Hat OpenShift Dev Spaces devspaces/code-rhel9not affected: component not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- yes
- Technical impact
- partial
- Assessed
- 8 mo ago
Exploit prediction
0.39% chance of exploitation in the next 30 days, higher than 33% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/koajs/koa/security/advisories/GHSA-7gcc-r8m5-44qm referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| CISA ADP | 3.1 | 8.2 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N |
| CNA | 3.1 | 8.2 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N |
| GitHub | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | koa | >=3.0.0, <3.1.2 <2.16.4 |
3.1.2 2.16.4 |
Affected products
- koajs koa
- Red Hat Red Hat OpenShift AI 2.25
- Red Hat Red Hat OpenShift Container Platform 4.19
- Red Hat Red Hat Developer Hub
- Red Hat Red Hat OpenShift AI (RHOAI)
- Red Hat Red Hat OpenShift Dev Spaces
- Red Hat Self-service automation portal 2
Classification
References
-
github.com
/koajs/koa/commit/55ab9bab044ead4e82c70a30a4f9dc0fc9c1b6df
web, patch
-
github.com
/koajs/koa/commit/b76ddc01fdb703e51652b0fd131d16394cadcfeb
web, patch
-
github.com
/koajs/koa/security/advisories/GHSA-7gcc-r8m5-44qm
web, exploit, vendor-advisory
-
access.redhat.com
/errata/RHSA-2026:10184
vendor-advisory
-
access.redhat.com
/errata/RHSA-2026:7249
vendor-advisory
-
access.redhat.com
/security/cve/CVE-2026-27959
vdb-entry
-
bugzilla.redhat.com
/show_bug.cgi?id=2442928
issue-tracking
- security.access.redhat.com /data/csaf/v2/vex/2026/cve-2026-27959.json
-
nvd.nist.gov
/vuln/detail/CVE-2026-27959
advisory
-
github.com
/koajs/koa
package
Sources
- CVE List CVE-2026-27959
- GitHub Advisory GHSA-7gcc-r8m5-44qm
- NVD CVE-2026-27959
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.