{"id":"CVE-2024-43800","aliases":["CVE-2024-43800","GHSA-cm22-4g7w-348p"],"related":[],"kind":"vulnerability","state":"published","title":"serve-static affected by template injection that can lead to XSS","summary":"serve-static serves static files. serve-static passes untrusted user input - even after sanitizing it - to redirect() may execute untrusted code. This issue is patched in serve-static 1.16.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"serve-static serves static files. serve-static passes untrusted user input - even after sanitizing it - to redirect() may execute untrusted code. This issue is patched in serve-static 1.16.0.","source":"cvelist"},{"lang":"en","text":"### Impact\n\npassing untrusted user input - even after sanitizing it - to `redirect()` may execute untrusted code\n\n### Patches\n\nthis issue is patched in serve-static 1.16.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":"serve-static sirve archivos estáticos. serve-static pasa información de usuario no confiable (incluso después de sanearla) a redirect() y puede ejecutar código no confiable. Este problema se solucionó en serve-static 1.16.0.","source":"nvd"}],"published":"2024-09-10T14:50:06.043Z","modified":"2026-09-10T03:50:18.868Z","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":"< 1.16.0","status":"affected"},{"version":">= 2.0.0, < 2.1.0","status":"affected"}],"vendor":"expressjs","product":"serve-static","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"1.16.0"}],"ecosystem":"npm","package":"serve-static","purl":"pkg:npm/serve-static","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"2.0.0","status":"affected","fixed":"2.1.0"}],"ecosystem":"npm","package":"serve-static","purl":"pkg:npm/serve-static","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"1.16.0"},{"status":"affected","introduced":"2.0.0","fixed":"2.1.0"}],"vendor":"openjsf","product":"serve-static","cpe":"cpe:2.3:a:openjsf:serve-static:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/expressjs/serve-static/security/advisories/GHSA-cm22-4g7w-348p","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/expressjs/serve-static/commit/0c11fad159898cdc69fd9ab63269b72468ecaf6b","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/expressjs/serve-static/commit/ce730896fddce1588111d9ef6fdf20896de5c6fa","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-43800","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/expressjs/serve-static","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-09-10T19:07:51.583Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-43800","url":"https://www.cve.org/CVERecord?id=CVE-2024-43800","licence":"CVE Terms of Use","modified":"2024-09-10T19:08:02.494Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-cm22-4g7w-348p","url":"https://github.com/advisories/GHSA-cm22-4g7w-348p","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:18.868Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-43800","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-43800","licence":"Public domain","modified":"2026-06-17T07:51:44.280Z"}],"updatedAt":"2026-11-25T22:58:45.242Z","epss":{"score":0.00867,"percentile":0.56388,"date":"2026-11-30T12:00:22.000Z"}}