XSS at ctx.redirect() function in Koajs (koajs koa)
At a glance
- Source
- NVD
- EPSS
- EPSS 0.26 % · percentile 18 ()
- State
- PUBLISHED
- Published
- Updated
- Assigner
- GitHub_M
- NVD status
- Analyzed
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.
Weaknesses (CWE)
- CWE-79 — Improper Neutralization of Input During Web Page Generation
References
Scores
| Version | Score | Vector | Scored by |
|---|---|---|---|
| CVSS 3.1 | MEDIUM 5.0 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L | GitHub_M |
| CVSS 3.1 | MEDIUM 5.0 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L | NVD · security-advisories@github.com (Secondary) |
| CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N | NVD · nvd@nist.gov (Primary) |
Advisories
- GHSA-x2rg-q646-7m2v — Koajs vulnerable to Cross-Site Scripting (XSS) at ctx.redirect() function
European references
- ENISA EUVD · EUVD-2025-10545
- GCVE · GCVE-0-2025-32379
Affected configurations (NVD CPE)
cpe:2.3:a:koajs:koa:*:*:*:*:*:node.js:*:*< 2.16.1cpe:2.3:a:koajs:koa:3.0.0:alpha0:*:*:*:node.js:*:*cpe:2.3:a:koajs:koa:3.0.0:alpha1:*:*:*:node.js:*:*cpe:2.3:a:koajs:koa:3.0.0:alpha2:*:*:*:node.js:*:*cpe:2.3:a:koajs:koa:3.0.0:alpha3:*:*:*:node.js:*:*cpe:2.3:a:koajs:koa:3.0.0:alpha4:*:*:*:node.js:*:*
Affected products
| Product | Versions |
|---|---|
| koajs · koa | affected >= 3.0.0-alpha.0, < 3.0.0-alpha.5 ; affected < 2.16.1 |
Sources
| Source | Licence |
|---|---|
| CVE List (CVEProject cvelistV5) | CVE Program Terms of Use |
| EPSS (FIRST.org) | FIRST — attribution requested |
| ENISA EUVD | ENISA — reproduction authorised, source acknowledged |
| NVD (NIST) via fkie-cad/nvd-json-data-feeds | Public domain — this product uses data from the NVD API but is not endorsed or certified by the NVD |