{"id":"CVE-2025-32379","aliases":["CVE-2025-32379","GHSA-x2rg-q646-7m2v"],"related":[],"kind":"vulnerability","state":"published","title":"XSS at ctx.redirect() function in Koajs","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","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.","source":"cvelist"},{"lang":"en","text":"### Summary\nIn 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.\n\n### Patches\nThis issue is patched in  2.16.1 and 3.0.0-alpha.5.\n\n### PoC\nComing soon...\n\n### Impact\n1. Redirect user to another phishing site\n2. Make request to another endpoint of the application based on user's cookie\n3. Steal user's cookie","format":"markdown","source":"ghsa"},{"lang":"es","text":"Koa es un middleware expresivo para Node.js que utiliza funciones asíncronas de ES2017. En koa anteriores a la 2.16.1 y a la 3.0.0-alpha.5, pasar información de usuario no confiable a ctx.redirect(), incluso después de depurarla, puede ejecutar código JavaScript en el usuario que usa la aplicación. Este problema se ha corregido en las versiones 2.16.1 y 3.0.0-alpha.5.","source":"nvd"}],"published":"2025-04-09T13:00:07.000Z","modified":"2026-06-17T09:11:54.453Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L","score":5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L","score":5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L","score":5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":">= 3.0.0-alpha.0, < 3.0.0-alpha.5","status":"affected"},{"version":"< 2.16.1","status":"affected"}],"vendor":"koajs","product":"koa","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.16.1"}],"ecosystem":"npm","package":"koa","purl":"pkg:npm/koa","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"3.0.0-alpha.1","status":"affected","fixed":"3.0.0-alpha.5"}],"ecosystem":"npm","package":"koa","purl":"pkg:npm/koa","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"2.16.1"},{"status":"affected","version":"3.0.0"},{"status":"affected","version":"3.0.0"},{"status":"affected","version":"3.0.0"},{"status":"affected","version":"3.0.0"},{"status":"affected","version":"3.0.0"}],"vendor":"koajs","product":"koa","cpe":"cpe:2.3:a:koajs:koa:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/koajs/koa/security/advisories/GHSA-x2rg-q646-7m2v","tags":["patch","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/koajs/koa/commit/ff25eb4a7f2392df46481fe86355161067687312","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-32379","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/koajs/koa","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"total","date":"2025-04-09T17:29:51.749Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-32379","url":"https://www.cve.org/CVERecord?id=CVE-2025-32379","licence":"CVE Terms of Use","modified":"2025-04-09T20:45:15.899Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-x2rg-q646-7m2v","url":"https://github.com/advisories/GHSA-x2rg-q646-7m2v","licence":"CC-BY-4.0","modified":"2025-04-09T20:29:43.000Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-32379","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-32379","licence":"Public domain","modified":"2026-06-17T09:11:54.453Z"}],"updatedAt":"2026-11-25T22:58:56.310Z","epss":{"score":0.00265,"percentile":0.19662,"date":"2026-12-01T12:00:22.000Z"}}