Skip to content
OpenAdvisories
Medium · 5.0 CVE-2025-32379 EUVD-2025-10545GHSA-x2rg-q646-7m2v

XSS at ctx.redirect() function in Koajs

Published Apr 9, 2025 · Updated Apr 9, 2025 · Assigned by GitHub_M

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

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

Affected packages

EcosystemPackageAffectedFixedRecord
npm koa < 2.16.1 2.16.1 GHSA-x2rg-q646-7m2v
npm koa >= 3.0.0-alpha.1, < 3.0.0-alpha.5 3.0.0-alpha.5 GHSA-x2rg-q646-7m2v

Advisories 1

References