What’s Vulnerable › Vulnerabilities
CVE-2024-43796: express vulnerable to XSS via response.redirect()
- Severity: medium (CVSS 4.7 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.5% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2024-09-10 · updated 2026-06-17
- Weakness: CWE-79
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 products
- expressjs express: before 4.20.0; 5.0.0-alpha1, 5.0.0-alpha2, 5.0.0-alpha3, 5.0.0-alpha4, 5.0.0-alpha5, 5.0.0-alpha6 (+5) — fixed in 4.20.0
- Npm Express: before 4.20.0; from 5.0.0-alpha.1 before 5.0.0 — fixed in 4.20.0, 5.0.0
How to fix
Upgrade to a fixed version: expressjs express 4.20.0; Npm Express 4.20.0, 5.0.0. Check the vendor advisory for mitigations.
References
- https://github.com/expressjs/express/commit/54271f69b511fea198471e6ff3400ab805d6b553
- https://github.com/expressjs/express/security/advisories/GHSA-qw6h-vgh9-j6wx
Get alerted when CVE-2024-43796 or the next vulnerability affects your stack