Skip to content

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

HighCVSS 7.5 EPSS 0.39%
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.

PackageAffectedFixed inStatus
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

ProductAffected versionsFixed 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