CVE-2025-32379: Koajs vulnerable to Cross-Site Scripting (XSS) at ctx.redirect() function
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 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
Published Apr 9, 2025 · Updated Oct 5, 2025
Affected packages
koa
- Ecosystem
- npm
- Affected
- < 2.16.1
- Fixed in
- 2.16.1
- Check
npm ls koa
koa
- Ecosystem
- npm
- Affected
- >= 3.0.0-alpha.1, < 3.0.0-alpha.5
- Fixed in
- 3.0.0-alpha.5
- Check
npm ls koa
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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
- Redirect user to another phishing site
- Make request to another endpoint of the application based on user's cookie
- Steal user's cookie
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More npm vulnerabilities
All npm entriesCVE-2026-27959
Koa has Host Header Injection via ctx.hostname
high7.5Feb 26, 2026CVE-2025-62595
Koa Vulnerable to Open Redirect via Trailing Double-Slash (//) in back Redirect Logic
medium4.7Oct 21, 2025CVE-2025-8129
Koa Open Redirect via Referrer Header (User-Controlled)
low3.5Jul 29, 2025CVE-2025-25200
Inefficient Regular Expression Complexity in koa
critical9.2Feb 12, 2025
