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

EcosystemPackageFixed inAdvisory
npmkoa2.16.1GHSA-x2rg-q646-7m2v
npmkoa3.0.0-alpha.5GHSA-x2rg-q646-7m2v

Affected products (as reported)

VendorProductVersions
koajs koa >= 3.0.0-alpha.0, < 3.0.0-alpha.5< 2.16.1

Weakness: CWE-79 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L

References