Koajs vulnerable to Cross-Site Scripting (XSS) at ctx.redirect() function
Package
Affected versions
< 2.16.1
>= 3.0.0-alpha.1, < 3.0.0-alpha.5
Patched versions
2.16.1
3.0.0-alpha.5
Description
Published to the GitHub Advisory Database
Apr 9, 2025
Reviewed
Apr 9, 2025
Published by the National Vulnerability Database
Apr 9, 2025
Last updated
Apr 9, 2025
Summary
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
References