CVE-2024-43796 — Vulnerability in express — CVE Details
express vulnerable to XSS via response.redirect()
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.63%). Schedule for your next planned update.
Does your project use an affected express version?
Paste your package-lock.json to check it for CVE-2024-43796 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
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
Advisory Timeline
- First published September 10, 2024 (807 days ago).
- Last revised September 10, 2026 — 729 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
npm install express@5.0.0
npm install express@4.20.0
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (2)
Affects 1 ecosystem: npm (1).
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-79Cross-site Scripting (XSS)MITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 5.0 score means for each attack dimension.
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L
References
Frequently Asked Questions
- What is CVE-2024-43796?
- express vulnerable to XSS via response.redirect(). This vulnerability has been assigned a severity rating of LOW (CVSS score: 5.0/10).
- How do I check if my project is affected by CVE-2024-43796?
- CVE-2024-43796 affects express. It has a 0.6% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2024-43796 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Exploitation requires specific conditions, or the impact is limited.
This is a below-median EPSS score — only 44.7% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2024-29041MEDIUM
Express.js Open Redirect in malformed URLs
- CVE-2026-94486LOW
Next.js has information disclosure in development server's Model Context Protocol endpoint
- CVE-2026-77063LOW
multer vulnerable to file size limit bypass via async fileFilter race condition