{"id":"CVE-2024-43796","aliases":["CVE-2024-43796","GHSA-qw6h-vgh9-j6wx"],"related":[],"kind":"vulnerability","state":"published","title":"express vulnerable to XSS via response.redirect()","summary":"Express.js minimalist web framework for node. In express < 4.20.0, passing untrusted user input - even after sanitizing it - to response.redirect() may execute untrusted code. This issue is patched in express 4.20.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Express.js minimalist web framework for node. In express < 4.20.0, passing untrusted user input - even after sanitizing it - to response.redirect() may execute untrusted code. This issue is patched in express 4.20.0.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nIn express <4.20.0, passing untrusted user input - even after sanitizing it - to `response.redirect()` may execute untrusted code\n\n### Patches\n\nthis issue is patched in express 4.20.0\n\n### Workarounds\n\nusers are encouraged to upgrade to the patched version of express, but otherwise can workaround this issue by making sure any untrusted inputs are safe, ideally by validating them against an explicit allowlist\n\n### Details\n\nsuccessful exploitation of this vector requires the following:\n\n1. The attacker MUST control the input to response.redirect()\n1. express MUST NOT redirect before the template appears\n1. the browser MUST NOT complete redirection before:\n1. the user MUST click on the link in the template","format":"markdown","source":"ghsa"},{"lang":"es","text":"Express.js, el framework web minimalista para Node. En Express anterior a la versión 4.20.0, pasar una entrada de usuario no confiable (incluso después de desinfectarla) a response.redirect() puede ejecutar código no confiable. Este problema se solucionó en Express 4.20.0.","source":"nvd"}],"published":"2024-09-10T14:36:27.380Z","modified":"2026-09-10T03:50:18.298Z","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":"LOW"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:L","rating":"LOW"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N","score":4.7,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":"< 4.20.0","status":"affected"},{"version":">= 5.0.0-alpha.1, < 5.0.0","status":"affected"}],"vendor":"expressjs","product":"express","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"4.20.0"}],"ecosystem":"npm","package":"express","purl":"pkg:npm/express","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"5.0.0-alpha.1","status":"affected","fixed":"5.0.0"}],"ecosystem":"npm","package":"express","purl":"pkg:npm/express","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"4.20.0"},{"status":"affected","version":"5.0.0"},{"status":"affected","version":"5.0.0"},{"status":"affected","version":"5.0.0"},{"status":"affected","version":"5.0.0"},{"status":"affected","version":"5.0.0"},{"status":"affected","version":"5.0.0"},{"status":"affected","version":"5.0.0"},{"status":"affected","version":"5.0.0"},{"status":"affected","version":"5.0.0"},{"status":"affected","version":"5.0.0"},{"status":"affected","version":"5.0.0"}],"vendor":"openjsf","product":"express","cpe":"cpe:2.3:a:openjsf:express:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/expressjs/express/security/advisories/GHSA-qw6h-vgh9-j6wx","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/expressjs/express/commit/54271f69b511fea198471e6ff3400ab805d6b553","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-43796","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/expressjs/express","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-09-10T15:58:36.256Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-43796","url":"https://www.cve.org/CVERecord?id=CVE-2024-43796","licence":"CVE Terms of Use","modified":"2024-09-10T15:58:45.956Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-qw6h-vgh9-j6wx","url":"https://github.com/advisories/GHSA-qw6h-vgh9-j6wx","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:18.298Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-43796","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-43796","licence":"Public domain","modified":"2026-06-17T07:51:43.847Z"}],"updatedAt":"2026-11-25T22:58:45.241Z","epss":{"score":0.00631,"percentile":0.44792,"date":"2026-11-30T12:00:22.000Z"}}