{"id":"CVE-2025-32379","published":"2025-04-09T15:56:40Z","modified":"2025-04-09T20:45:15Z","title":"XSS at ctx.redirect() function in Koajs","vendor":"koajs","product":"koa","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00265,"percentile":0.18764,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/koajs/koa/security/advisories/GHSA-x2rg-q646-7m2v","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/koajs/koa/commit/ff25eb4a7f2392df46481fe86355161067687312","tags":["x_refsource_MISC"]}],"priority":{"score":7.3,"factors":[{"name":"EPSS percentile","points":3.75},{"name":"CVSS severity","points":3.5}]},"vendorSlug":"koajs","affectedVersions":[{"vendor":"koajs","product":"koa","versions":[">= 3.0.0-alpha.0, < 3.0.0-alpha.5","< 2.16.1"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"total","timestamp":"2025-04-09T17:29:51.749257Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"koa","vulnerableRanges":["<2.16.1",">=3.0.0-alpha.1, <3.0.0-alpha.5"],"patched":["2.16.1","3.0.0-alpha.5"],"from":["GHSA-x2rg-q646-7m2v"],"provenance":"source"}],"euvd":{"id":"EUVD-2025-10545","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-koajs-koa-cve-2025-32379","children":[{"from":"CVE-2025-32379","to":"CVE-2025-8129","relation":"successor","confidence":"high","kind":"lineage","evidence":[{"kind":"version-step","provenance":"source","package":"npm:koa","fromFixed":"3.0.0-alpha.5","toFixed":"3.0.1","daysApart":107},{"kind":"version-step","provenance":"source","package":"npm:koa","fromFixed":"2.16.1","toFixed":"2.16.2","daysApart":107},{"kind":"same-code","provenance":"machine","files":["lib/response.js"],"commits":["https://github.com/koajs/koa/commit/ff25eb4a7f2392df46481fe86355161067687312","https://github.com/koajs/koa/commit/422c551c63d00f24e2bbbdf492f262a5935bb1f0"],"basis":"rarely changed file"}]},{"from":"CVE-2025-32379","to":"CVE-2025-62595","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["lib/response.js"],"commits":["https://github.com/koajs/koa/commit/ff25eb4a7f2392df46481fe86355161067687312","https://github.com/koajs/koa/commit/769fd75cc6b30d72493b370b5a3ae2332ca03c5b"],"basis":"rarely changed file"}]}],"packageHistory":[{"cve":"CVE-2025-25200","published":"2025-02-12","fixed":"3.0.0-alpha.3","kev":false,"link":{"from":"CVE-2025-25200","to":"CVE-2025-32379","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:koa","fromFixed":"3.0.0-alpha.3","toFixed":"3.0.0-alpha.5","daysApart":56},{"kind":"version-step","provenance":"source","package":"npm:koa","fromFixed":"2.15.4","toFixed":"2.16.1","daysApart":56}]}},{"cve":"CVE-2025-32379","published":"2025-04-09","fixed":"3.0.0-alpha.5","kev":false},{"cve":"CVE-2025-8129","published":"2025-07-25","fixed":"3.0.1","kev":false},{"cve":"CVE-2025-62595","published":"2025-10-21","fixed":"3.0.3","kev":false},{"cve":"CVE-2026-27959","published":"2026-02-26","fixed":"3.1.2","kev":false}],"package":"npm:koa"}}