CVE-2026-27959 Koa has Host Header Injection via `ctx.hostname`
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- Proof of concept public · automatable: yes · technical impact: partial
- Technology
- Red Hat
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.
Upgrade path
12 packages: 3 fixed, 1 partially fixed, 7 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| redhat ansible portal | All versions | No fix listed | No fix yet |
| redhat rhdh | All versions | No fix listed | No fix yet |
| redhat/ansible-automation-platform/automation-portal(Red Hat ansible_portal 2) | All versions | No fix listed | No fix yet |
| redhat/openshift4/ose-monitoring-plugin-rhel9:1775577192(Red Hat openshift 4.19 el9) | All versions | No fix listed | No fix yet |
| redhat/rhdh/rhdh-hub-rhel9(Red Hat rhdh 1) | All versions | No fix listed | No fix yet |
| redhat/rhoai/odh-dashboard-rhel9:1776742021(Red Hat openshift_ai 2.25 el9) | All versions | No fix listed | No fix yet |
| redhat/rhoai/odh-mod-arch-model-registry-rhel9:1776742141(Red Hat openshift_ai 2.25 el9) | All versions | No fix listed | No fix yet |
| redhat openshift ai | < 1776742021; < 1776742141; All versions | 1776742021, 1776742141 | Partially fixed |
| koajs koa | < 2.16.4; = < 2.16.4; = >= 3.0.0, < 3.1.2; >= 3.0.0, < 3.1.2 | 2.16.4, 3.1.2 | Fixed |
| npm koa(npm) | < 2.16.4; >= 3.0.0, < 3.1.2 | 2.16.4, 3.1.2 | Fixed |
| redhat openshift | < 1775577192 | 1775577192 | Fixed |
| redhat openshift devspaces | = 3 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| koajs koa | = >= 3.0.0, < 3.1.2 | No fix listed |
| koajs koa | = < 2.16.4 | No fix listed |
| redhat openshift ai | < 1776742021 | 1776742021 |
| redhat openshift ai | < 1776742141 | 1776742141 |
| redhat openshift | < 1775577192 | 1775577192 |
| redhat rhdh | All versions | No fix listed |
| redhat openshift ai | All versions | No fix listed |
| redhat openshift devspaces | = 3 | No fix listed |
| redhat ansible portal | All versions | No fix listed |
| npm koa(npm) | >= 3.0.0, < 3.1.2 | 3.1.2 |
| npm koa(npm) | < 2.16.4 | 2.16.4 |
| redhat/rhoai/odh-dashboard-rhel9:1776742021(Red Hat:openshift_ai:2.25::el9) | All versions | No fix listed |
| redhat/rhoai/odh-mod-arch-model-registry-rhel9:1776742141(Red Hat:openshift_ai:2.25::el9) | All versions | No fix listed |
| redhat/openshift4/ose-monitoring-plugin-rhel9:1775577192(Red Hat:openshift:4.19::el9) | All versions | No fix listed |
| redhat/rhdh/rhdh-hub-rhel9(Red Hat:rhdh:1) | All versions | No fix listed |
| redhat/rhoai/odh-mod-arch-gen-ai-rhel9(Red Hat:openshift_ai) | All versions | No fix listed |
| redhat/ansible-automation-platform/automation-portal(Red Hat:ansible_portal:2) | All versions | No fix listed |
| koajs koa | < 2.16.4 | 2.16.4 |
| koajs koa | >= 3.0.0, < 3.1.2 | 3.1.2 |
References
- https://github.com/koajs/koa/security/advisories/GHSA-7gcc-r8m5-44qm exploit vendor-advisory
- https://github.com/koajs/koa/commit/55ab9bab044ead4e82c70a30a4f9dc0fc9c1b6df patch
- https://github.com/koajs/koa/commit/b76ddc01fdb703e51652b0fd131d16394cadcfeb patch
- Red Hat CVE page mitigation vdb-entry vendor-advisory
- RHBZ#2442928 issue-tracking
- security.access.redhat.com
- RHSA-2026:10184 patch vendor-advisory
- RHSA-2026:7249 patch vendor-advisory
- nvd.nist.gov third-party-advisory vendor-advisory
- github.com
- www.cve.org
- github.com product