REDHAT-BUG-2442928: High severity npm/koa vulnerability
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
Event History
Frequently Asked Questions
What is the severity of REDHAT-BUG-2442928?
The severity of REDHAT-BUG-2442928 is classified as high with a score of 7.
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.
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.
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.
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.