What’s Vulnerable › Vulnerabilities
CVE-2025-32379: XSS at ctx.redirect() function in Koajs
- Severity: medium (CVSS 6.1 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.3% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2025-04-09 · updated 2026-06-17
- Weakness: CWE-79
Description
Koa is expressive middleware for Node.js using ES2017 async functions. 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. This issue is patched in 2.16.1 and 3.0.0-alpha.5.
Affected products
- koajs koa: before 2.16.1; 3.0.0-alpha0, 3.0.0-alpha1, 3.0.0-alpha2, 3.0.0-alpha3, 3.0.0-alpha4 — fixed in 2.16.1
How to fix
Upgrade to a fixed version: koajs koa 2.16.1. Check the vendor advisory for mitigations.
References
- https://github.com/koajs/koa/commit/ff25eb4a7f2392df46481fe86355161067687312
- https://github.com/koajs/koa/security/advisories/GHSA-x2rg-q646-7m2v
Get alerted when CVE-2025-32379 or the next vulnerability affects your stack