# CVE-2026-142247: Koa through 3.3.0 Host Header Validation Bypass via request.hostname

Source: https://aplosec.si/cve/CVE-2026-142247/

[AploSec](https://aplosec.si/) / [Disclosures](https://aplosec.si/disclosures/) / CVE-2026-142247

Low 2.3 · Reported · No fix listed · CWE-1286 · npm

# Koa through 3.3.0 Host Header Validation Bypass via request.hostname

CVE-2026-142247 · published 2026-12-02

## Summary

CVE-2026-142247 affects Koa (npm) <= 3.3.0: Host Header Validation Bypass via request.hostname (CWE-1286). No fixed release is listed. CVSS 4.0 base score 2.3 (Low), assigned by VulnCheck. Published 2026-12-02 by VulnCheck. Credit: Zachariah Mithani (AploSec).

Koa through 3.3.0 fails to properly validate Host header values containing URL delimiters, allowing remote attackers to bypass hostname allowlists in request.host and request.hostname. Attackers can send a Host header with a backslash, slash, question mark, or hash so ctx.hostname ends with a trusted domain while ctx.href resolves to an attacker host, poisoning redirects and password reset links.

## Evidence

Reported to the maintainer. The public advisory and references below describe the evidence and preconditions; reporting status alone does not establish independent reproduction.

## Remediation

No fixed release is listed in the advisory. Check the references for upstream status.

## References

- [VulnCheck advisoryhttps://www.vulncheck.com/advisories/koa-through-3.3.0-host-header-validation-bypass-via-request-hostname](https://www.vulncheck.com/advisories/koa-through-3.3.0-host-header-validation-bypass-via-request-hostname)

- [Vulnerable codehttps://github.com/koajs/koa/blob/v3.3.0/lib/request.js#L253-L292](https://github.com/koajs/koa/blob/v3.3.0/lib/request.js#L253-L292)

- [CVE recordhttps://www.cve.org/CVERecord?id=CVE-2026-142247](https://www.cve.org/CVERecord?id=CVE-2026-142247)

**Severity:** Low 2.3 CVSS 4.0, scored by VulnCheck in the [CVE record](https://www.cve.org/CVERecord?id=CVE-2026-142247)

**Package:** Koa

**Ecosystem:** npm

**Affected:** <= 3.3.0

**Fixed:** None

**Weakness:** CWE-1286

**CNA:** VulnCheck

**Credit:** Zachariah Mithani (AploSec) finder
