CVE-2025-32379: XSS at ctx.redirect() function in Koajs

5.0 CVSS

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.

Classification

CVE ID: CVE-2025-32379

CVSS Base Severity: MEDIUM

CVSS Base Score: 5.0

CVSS Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L

Problem Types

CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Affected Products

Vendor: koajs

Product: koa

Exploit Prediction Scoring System (EPSS)

EPSS Score: 0.04% (probability of being exploited)

EPSS Percentile: 9.38% (scored less or equal to compared to others)

EPSS Date: 2025-04-21 (when was this score calculated)

References

https://nvd.nist.gov/vuln/detail/CVE-2025-32379
https://github.com/koajs/koa/security/advisories/GHSA-x2rg-q646-7m2v
https://github.com/koajs/koa/commit/ff25eb4a7f2392df46481fe86355161067687312

Timeline