Advisories · Node.js & Next.js
CVE-2024-29041
Medium
CVSS 6.1
Express open redirect
Disclosed 2024 · Last reviewed 2 Dec 2026
res.redirect and res.location could send a browser to a host the application did not intend.
What happened
A malformed path was interpreted as a scheme-relative URL.
Affected and patched versions
- Affected
- Express before 4.19.2, and the 5 beta line before its matching fix.
- Patched
- Express 4.19.2 and later 4.x, and the patched 5 release.
How to check your server
Check
npm ls express
How to fix and harden
- Upgrade Express to 4.19.2 or later on the 4.x line.
- Pass only relative paths you built yourself to res.redirect.
Fix
npm ls express
Sources
Version ranges and fixes follow the vendor advisory. When a distribution backports a fix, trust its security tracker over the upstream version number. New advisories: RSS · JSON