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

Published Dec 2, 2026
·
Updated

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.

Affected Software

1 affected component
npm/koa<=3.3.0

Event History

Dec 2, 2026
CVE Published
via MITRE·04:49 PM
Data Sourced
via MITRE·04:49 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments are most exposed to this issue?

Koa applications that use request.host or request.hostname for hostname allowlists and then generate redirects or password-reset links are most exposed. The issue can cause the hostname check to see a trusted domain while the resulting URL resolves to an attacker-controlled host.

2

Does exploitation require an authenticated attacker or victim interaction?

The supplied vector indicates that no attacker privileges are required, but user interaction is required. An attacker can send a crafted Host header and would need a victim to follow or use a poisoned redirect or password-reset link.

3

What Host header values are relevant when investigating attempted exploitation?

The affected validation can be bypassed using Host header values containing a backslash, slash, question mark, or hash. Review requests and application behavior involving these delimiters where hostname-based allowlists or generated links are used.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203