Vulnerability · Published Apr 9, 2025 · Assigned by GitHub_M
CVE-2025-32379XSS at ctx.redirect() function in Koajs
Medium 5.0
In plain English
A medium-severity cross-site scripting in koa from koajs. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 19% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Severity (CVSS 3.1)5.0Medium
Exploit odds (30 days)0.3%top 81.1% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known
Official 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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| npm | koa | 2.16.1 | GHSA-x2rg-q646-7m2v |
| npm | koa | 3.0.0-alpha.5 | GHSA-x2rg-q646-7m2v |
Affected products (as reported)
Weakness: CWE-79 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L
References
- https://github.com/koajs/koa/security/advisories/GHSA-x2rg-q646-7m2v x_refsource_CONFIRM
- https://github.com/koajs/koa/commit/ff25eb4a7f2392df46481fe86355161067687312 x_refsource_MISC