Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.
Open advisories
5 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.
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 (e.g., evil.com:fake@legitimate.com) 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. Details The vulnerability exists in Koa's hostname getter in lib/request.js: The host getter retrieves the raw header value with HTTP/2 and proxy support: The Problem The parsing logic simply splits on the first : and returns the first segment. There is no validation that the resulting string is a valid hostname per RFC 3986 Section 3.2.2. RFC 3986 Section 3.2.2 defines the host component as: The @ character is explicitly NOT permitted in the host component - it is the…
Recommended action: Upgrade to 3.1.2 or 2.16.4 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.
A bypass was discovered in the Koa.js framework affecting its back redirect functionality. In certain circumstances, an attacker can manipulate the Referer header to force a user’s browser to navigate to an external, potentially malicious website. This occurs because the implementation incorrectly treats some specially crafted URLs as safe relative paths. Exploiting this vulnerability could allow attackers to perform phishing, social engineering, or other redirect-based attacks on users of affected applications. This vulnerability affects the code referenced in GitHub Advisory GHSA-jgmv-j7ww-jx2x (which is tracked as CVE‑2025‑54420). Details: The patched code attempts to treat values that startWith('/') as safe relative paths and only perform origin checks for absolute URLs. However, protocol‑relative URLs (those beginning with //host) also start with '/' and therefore match the startsWith('/') branch. A protocol‑relative referrer such as //evil.com with trailing…
Recommended action: Upgrade to 3.0.3 or 2.16.3 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.
In the latest version of Koa, the back method used for redirect operations adopts an insecure implementation, which uses the user-controllable referrer header as the redirect target. Details on the API document https://www.koajs.net/api/response#responseredirecturl-alt, we can see: response.redirect(url, [alt]) however, the "back" method is insecure: - https://github.com/koajs/koa/blob/master/lib/response.js#L322 Referrer Header is User-Controlled. PoC there is a demo for POC: Proof Of Concept Impact https://learn.snyk.io/lesson/open-redirect/
Recommended action: Upgrade to 3.0.1 or 2.16.2 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.
In koa < 2.16.1 and < 3.0.0-alpha.5, passing untrusted user input to ctx.redirect() even after sanitizing it, may execute javascript code on the user who use the app. Patches This issue is patched in 2.16.1 and 3.0.0-alpha.5. PoC Coming soon... Impact 1. Redirect user to another phishing site 2. Make request to another endpoint of the application based on user's cookie 3. Steal user's cookie
Recommended action: Upgrade to 3.0.0-alpha.5 (pre-release) or 2.16.1 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.
1.7.10.21.23.0.0-alpha.32.15.4· Vendor fix available
Issue
Koa uses an evil regex to parse the X-Forwarded-Proto and X-Forwarded-Host HTTP headers. This can be exploited to carry out a Denial-of-Service attack. PoC Coming soon. Impact This is a Regex Denial-of-Service attack and causes memory exhaustion. The regex should be improved and empty values should not be allowed.
Recommended action: Upgrade to 3.0.0-alpha.3 (pre-release), 2.15.4, 1.7.1 or 0.21.2 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.