serve-static affected by template injection that can lead to XSS
cve-program · CVE-2024-43800
Publishedserve-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.
Read the publisher's advisoryeuvd · EUVD-2024-2771
Publishedserve-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.
Read the publisher's advisorynvd · CVE-2024-43800
Publishedserve-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.
Read the publisher's advisoryosv · GHSA-cm22-4g7w-348p
Published### Impact passing untrusted user input - even after sanitizing it - to `redirect()` may execute untrusted code ### Patches this issue is patched in serve-static 1.16.0 ### Workarounds users 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 ### Details successful exploitation of this vector requires the following: 1. The attacker MUST control the input to response.redirect() 1. express MUST NOT redirect before the template appears 1. the browser MUST NOT complete redirection before: 1. the user MUST click on the link in the template
Read the publisher's advisoryAffected versions, risk and source history
Related advisories and sources
Publishers link these advisories through the identifiers shown below. A shared identifier or date alone does not tell you whether your software is affected or whether the advisories describe the same cause.
CVE-2024-43800 · CVE overview and exploitation status
cve-program · CVE-2024-43800
- https://github.com/expressjs/serve-static/security/advisories/GHSA-cm22-4g7w-348p
- https://github.com/expressjs/serve-static/commit/0c11fad159898cdc69fd9ab63269b72468ecaf6b
- https://github.com/expressjs/serve-static/commit/ce730896fddce1588111d9ef6fdf20896de5c6fa
euvd · EUVD-2024-2771
- https://github.com/expressjs/serve-static/security/advisories/GHSA-cm22-4g7w-348p
- https://github.com/expressjs/serve-static/commit/0c11fad159898cdc69fd9ab63269b72468ecaf6b
- https://github.com/expressjs/serve-static/commit/ce730896fddce1588111d9ef6fdf20896de5c6fa
nvd · CVE-2024-43800
- https://github.com/expressjs/serve-static/commit/0c11fad159898cdc69fd9ab63269b72468ecaf6b
- https://github.com/expressjs/serve-static/commit/ce730896fddce1588111d9ef6fdf20896de5c6fa
- https://github.com/expressjs/serve-static/security/advisories/GHSA-cm22-4g7w-348p
osv · GHSA-cm22-4g7w-348p
- https://github.com/expressjs/serve-static/security/advisories/GHSA-cm22-4g7w-348p
- https://nvd.nist.gov/vuln/detail/CVE-2024-43800
- https://github.com/expressjs/serve-static/commit/0c11fad159898cdc69fd9ab63269b72468ecaf6b
- https://github.com/expressjs/serve-static/commit/ce730896fddce1588111d9ef6fdf20896de5c6fa
- https://github.com/expressjs/serve-static
Related changes
Linked by CVE identifierNo related changes are available here.