GitHub Advisoryadvisory · npm

GHSA-x2rg-q646-7m2v Koajs vulnerable to Cross-Site Scripting (XSS) at ctx.redirect() function

MEDIUM Published 2025-04-09 Modified 2025-04-09 Official page ↗
Aliases
CVE-2025-32379
Ecosystem
npm
Packages
koa
Severity
Moderate
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L
Weaknesses
CWE-79
Reviewed
2025-04-09

Affected packages

• npm koa: < 2.16.1 → fixed in 2.16.1 • npm koa: >= 3.0.0-alpha.1, < 3.0.0-alpha.5 → fixed in 3.0.0-alpha.5

Description

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

Related

Alias · CVE (1)

  • CVE-2025-32379 Koa is expressive middleware for Node.js using ES2017 async functions. vulnerability

Weakness · CWE (1)

  • CWE-79 Improper Neutralization of Input During Web Page Generation weakness

References