5.0medium
express vulnerable to XSS via response.redirect()
- Severity
- 5.0medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.63% (higher than 45% of CVEs)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-qw6h-vgh9-j6wx
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| expressjs express | < 4.20.0, >= 5.0.0-alpha.1, < 5.0.0 | CVE List |
| express (npm) | before 4.20.0, from 5.0.0-alpha.1 before 5.0.0 | GitHub Advisory Database |
| openjsf express | before 4.20.0, 5.0.0 | NVD |
All scores
| GitHub_M | 5.0medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L |
| GitHub | 5.0low CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L |
| GitHub | low CVSS:4.0 | 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 |
| NVD | 4.7medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
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.
GitHub Advisory Database
Impact
In express <4.20.0, passing untrusted user input - even after sanitizing it - to response.redirect() may execute untrusted code
Patches
this issue is patched in express 4.20.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:
- The attacker MUST control the input to response.redirect()
- express MUST NOT redirect before the template appears
- the browser MUST NOT complete redirection before:
- the user MUST click on the link in the template
NVD (es)
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.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-43796 changed 2024-09-10 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-qw6h-vgh9-j6wx changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2024-43796 changed 2026-06-17 | Public domain |