CVE-2024-29041 is a medium-severity (CVSS 6.1) Open Redirect vulnerability in express. A fix is available for express — see the affected versions and patch details below.
Express.js Open Redirect in malformed URLs
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2024-29041.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
How urgent is this, really
CVE-2024-29041 plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.
Where this sits among everything scored
Of 378,156 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
expressnpmDescription
Impact
Versions of Express.js prior to 4.19.2 and pre-release alpha and beta versions before 5.0.0-beta.3 are affected by an open redirect vulnerability using malformed URLs.
When a user of Express performs a redirect using a user-provided URL Express performs an encode using encodeurl on the contents before passing it to the location header. This can cause malformed URLs to be evaluated in unexpected ways by common redirect allow list implementations in Express applications, leading to an Open Redirect via bypass of a properly implemented allow list.
The main method impacted is res.location() but this is also called from within res.redirect().
Patches
https://github.com/expressjs/express/commit/0867302ddbde0e9463d0564fea5861feb708c2dd https://github.com/expressjs/express/commit/0b746953c4bd8e377123527db11f9cd866e39f94
An initial fix went out with [email protected], we then patched a feature regression in 4.19.1 and added improved handling for the bypass in 4.19.2.
Workarounds
The fix for this involves pre-parsing the url string with either require('node:url').parse or new URL. These are steps you can take on your own before passing the user input string to res.location or res.redirect.
Resources
https://github.com/expressjs/express/pull/5539 https://github.com/koajs/koa/issues/1800 https://expressjs.com/en/4x/api.html#res.location
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | express | all versions | 4.19.2npm install express@4.19.2 |
| 📦npm | express | ≥ 5.0.0-alpha.1&&< 5.0.0-beta.3 | 5.0.0-beta.3npm install express@5.0.0-beta.3 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for express, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update express to 4.19.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2024-29041 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like CVE-2024-29041 can be triaged on real exposure rather than presence alone.
Tailored to CVE-2024-29041. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
Red Hat Fuse 7 only uses express as part of build time development dependency, it is not part of the final product delivery. Upstream versions should not be relied upon for ultimate determination of affectedness. Red Hat might backport fixes from upstream versions on a case by case basis.
| Product | Fixed in | Advisory |
|---|---|---|
| NETWORK-OBSERVABILITY-1.6.0-RHEL-9 | network-observability/network-observability-cli-rhel9:v1.6.0-66 | RHSA-2024:3868 |
| OpenShift-Pipelines-1.16-RHEL-8 | openshift-pipelines/pipelines-chains-controller-rhel8:v1.16.0-6 | RHEA-2024:7870 |
| Red Hat build of Apicurio Registry 2.6.1 GA | express | RHSA-2024:4873 |
| Red Hat Migration Toolkit for Containers 1.8 | rhmtc/openshift-migration-ui-rhel8:v1.8.4-10 | RHSA-2024:7164 |
| Red Hat OpenShift Service Mesh 2.6 for RHEL 8 | openshift-service-mesh/grafana-rhel8:2.6.1-6 | RHSA-2024:6211 |
| RHODF-4.14-RHEL-9 | odf4/mcg-core-rhel9:v4.14.11-1 | RHSA-2024:7624 |
| RHODF-4.14-RHEL-9 | odf4/ocs-client-console-rhel9:v4.14.18-2 | RHSA-2025:8551 |
| RHODF-4.15-RHEL-9 | odf4/ocs-client-console-rhel9:v4.15.14-2 | RHSA-2025:8544 |
Frequently Asked Questions
Is CVE-2024-29041 in your dependencies?
O3 Security finds CVE-2024-29041 across npm dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.