SecurityContext

CVE-2026-27959: Koa - Host Header Injection

  • Cve: CVE-2026-27959
  • Name: Koa - Host Header Injection
  • 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.
  • Impact: Attackers can inject arbitrary hostnames, potentially leading to phishing, URL spoofing, or bypassing security checks.
  • Remediation: Upgrade to versions 3.1.2 or 2.16.4 or later.
  • Vulnerability type: host_header_injection
  • Vulnerability impact: open_redirect
  • Requirement type: none
  • Labels source: projectdiscovery
  • Severity: high
  • Cvss score: 7.5
  • Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
  • Epss score: 0.004
  • Epss percentile: 0.3474
  • Assignee: [email protected]
  • Published at: 2026-02-26T02:16:23Z
  • Age in days: 271
  • Modified at: 2026-07-15T02:19:12Z
  • Patch available: yes
  • Public exploits total: 2
  • References total: 8
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2026-27959
  • Nvd status: modified
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits capped, rejected by nvd
  • Not known: requirements, hackerone

Cwe

IdName
CWE-20Improper Input Validation
NVD-CWE-noinfo—

Public exploits

UrlSourceAdded date
https://github.com/koajs/koa/security/advisories/GHSA-7gcc-r8m5-44qmnvd2026-02-26
https://github.com/mlouazir/CVE-2026-27959-mini-labpoc-in-github2026-03-09

References

Same in every row:

  • Source: nvd
UrlTags
https://github.com/koajs/koa/commit/55ab9bab044ead4e82c70a30a4f9dc0fc9c1b6dfPatch
https://github.com/koajs/koa/commit/b76ddc01fdb703e51652b0fd131d16394cadcfebPatch
https://github.com/koajs/koa/security/advisories/GHSA-7gcc-r8m5-44qmExploit, Vendor Advisory
https://access.redhat.com/errata/RHSA-2026:10184
https://access.redhat.com/errata/RHSA-2026:7249
https://access.redhat.com/security/cve/CVE-2026-27959
https://bugzilla.redhat.com/show_bug.cgi?id=2442928
https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-27959.json

Products

ProductAffectedPlatform boundSourcesUrl
koajs:koa>= 3.0.0, < 3.1.2; < 2.16.4nonvd/v1/products/koajs/koa

Projects

RepositoryLink kindsIndexedUrl
koajs/koacommit, fix, package, security_advisoryyes/v1/repositories/koajs/koa

Index

  • Repositories: 88
  • Repositories high signal: 55
  • Packages: 1

Exploitation

  • Public exploit: yes
  • Public exploit count: 2
  • Public exploit first date: 2026-02-26
  • Remote: yes
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access, authentication required
  • Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, hackerone reports, exposed hosts