CVE-2024-9266
Medium · 4.7CVSS
4.7
EPSS
0.5%
Published
Oct 3, 2024
CISA due date
—
Cloudanix analysis
A flaw in the Express web framework can let attackers trick the site into sending visitors to fake or harmful web pages instead of the intended destination.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Data Exposure
- Component
- Web Framework
- Class
- Open Redirect
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Medium
What it actually does
An attacker can supply a crafted URL to the Express Response object's redirect method, causing the application to redirect users to an arbitrary untrusted destination without validation.
Why it matters to the business
Users may be sent to phishing or malicious sites, eroding customer trust, enabling credential theft, and increasing downstream security incidents.
How an attack unfolds
An attacker identifies an Express endpoint that passes user-supplied data into res.redirect, crafts a link containing a malicious target URL, and lures victims to click it, resulting in redirection to attacker-controlled content.
How to fix it
Upgrade Express from versions 3.4.5 through 3.x to version 4.0.0 or later; implement a whitelist of allowed redirect targets in application code.
How to confirm the fix worked
Confirm the installed Express version is 4.0.0 or higher; review source for any remaining direct use of user input in res.redirect and test that only whitelisted domains are accepted.
Typical attack path
- Locate Express application routes that invoke res.redirect with unsanitized input
- Construct a request parameter that points the redirect to an external attacker domain
- Distribute the crafted link via email, social media, or other channels
- Victim browser follows the redirect to the malicious site
How to detect it
Inspect web server and application logs for redirect responses containing external domains not present in the application's normal allowlist; correlate with user-agent and referrer fields for suspicious patterns.
What your security team should do
- Upgrade all instances of Express to 4.0.0 or later immediately
- Add server-side validation enforcing an allowlist for redirect destinations
- Audit logs for redirects to external domains outside the organization's control
The record
URL Redirection to Untrusted Site ('Open Redirect') vulnerability in Express. This vulnerability affects the use of the Express Response object. This issue impacts Express: from 3.4.5 before 4.0.0.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| npm | express | 3.4.5 | 4.0.0-rc1 |
| Ubuntu:20.04:LTS | node-express | 0 | No fix |
| Ubuntu:22.04:LTS | node-express | 0 | No fix |
| Ubuntu:24.04:LTS | node-express | 0 | No fix |
| Ubuntu:24.10 | node-express | 0 | No fix |
| Ubuntu:25.04 | node-express | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | node-express | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | node-express | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | node-express | 0 | No fix |
Related vulnerabilities
- CVE-2024-51999 Express.js minimalist web framework for node. Also affects express
- GHSA-pj86-cfqh-vqx6 Withdrawn Advisory: express improperly controls modification of query properties Also affects express
- CVE-2024-10491 A vulnerability has been identified in the Express response.links function, allowing for… Also affects express
- CVE-2024-52798 path-to-regexp turns path strings into a regular expressions. Also affects node-express
- CVE-2024-45296 path-to-regexp turns path strings into a regular expressions. Also affects node-express
- CVE-2026-87945 URL Redirection to Untrusted Site ('Open Redirect') vulnerability in Drupal SAML SSO… CWE-601
- CVE-2026-87937 URL Redirection to Untrusted Site ('Open Redirect') vulnerability in Drupal Central… CWE-601
- CVE-2026-112034 A weakness has been identified in aircheng-org iWebShop-5 up to 5.16. CWE-601