Skip to main content

CVE-2024-43796 — Vulnerability in express — CVE Details

LOW

express vulnerable to XSS via response.redirect()

Published September 10, 2024Updated September 10, 2026Source: OSV

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.

Check my package-lock.json

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:

  1. The attacker MUST control the input to response.redirect()
  2. express MUST NOT redirect before the template appears
  3. the browser MUST NOT complete redirection before:
  4. 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
Update express to 5.0.0 or later
npm install express@5.0.0
npm
Update express to 4.20.0 or later
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).

PackageFixed In
express npm · Affected: All versions5.0.0
express npm · Affected: All versions4.20.0

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-79
    Cross-site Scripting (XSS)MITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 5.0 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
Low

CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L

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

CVSS Score
5.0

Exploitation requires specific conditions, or the impact is limited.

EPSS Score (30-day exploit probability)
0.63%
EPSS percentile: 44.7

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

GHSA-qw6h-vgh9-j6wx

Related CVEs

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my package-lock.json