REDHAT-BUG-2442928: High severity npm/koa vulnerability

Published Feb 26, 2026
·
Updated

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.

Affected Software

1 affected component
npm/koa<3.1.2, <2.16.4

Event History

Feb 26, 2026
Data Sourced
via Red Hat·03:01 AM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of REDHAT-BUG-2442928?

The severity of REDHAT-BUG-2442928 is classified as high with a score of 7.

2

How do I fix REDHAT-BUG-2442928?

To fix REDHAT-BUG-2442928, update Koa to version 3.1.2 or later, or 2.16.4 or later.

3

What impact does REDHAT-BUG-2442928 have on my application?

REDHAT-BUG-2442928 can lead to potential information disclosure or application behavior inconsistency due to the naive parsing of the HTTP Host header.

4

Which versions of Koa are affected by REDHAT-BUG-2442928?

Koa versions prior to 3.1.2 and 2.16.4 are affected by REDHAT-BUG-2442928.

5

Is REDHAT-BUG-2442928 present in the latest version of Koa?

No, REDHAT-BUG-2442928 is not present in Koa versions 3.1.2 and 2.16.4 or later.

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