Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
MEDIUM severity

CVE-2024-29041 — express

MEDIUMFix: expressjs/express@0867302

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

Also known asGHSA-rv95-896h-c2vc
Published
Mar 25, 2024
Updated
Aug 12, 2026
Affected
2 pkgs
Patched
2 / 2
Exploits
None indexed
Exploitation data as of Sep 24, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

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

via FIRST.org ↗
0.8%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs54th percentile — riskier than 54% of all scored CVEsHighest risk

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

2 pkgs affected

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.

108Kother npm packages depend on this — each one inherits the vulnerability until it's patched upstream
expressnpm
101.5Mdownloads / week

Description

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

2 total 2 fixed
EcosystemPackageVulnerable rangeFix
📦npmexpressall versions4.19.2npm install express@4.19.2
📦npmexpress≥ 5.0.0-alpha.1&&< 5.0.0-beta.35.0.0-beta.3npm install express@5.0.0-beta.3

Detection & mitigation playbook

Open-source dependency
  1. Detect

    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.

  2. 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.

  3. 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.

  4. 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 HatImportant

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.

ProductFixed inAdvisory
NETWORK-OBSERVABILITY-1.6.0-RHEL-9network-observability/network-observability-cli-rhel9:v1.6.0-66RHSA-2024:3868
OpenShift-Pipelines-1.16-RHEL-8openshift-pipelines/pipelines-chains-controller-rhel8:v1.16.0-6RHEA-2024:7870
Red Hat build of Apicurio Registry 2.6.1 GAexpressRHSA-2024:4873
Red Hat Migration Toolkit for Containers 1.8rhmtc/openshift-migration-ui-rhel8:v1.8.4-10RHSA-2024:7164
Red Hat OpenShift Service Mesh 2.6 for RHEL 8openshift-service-mesh/grafana-rhel8:2.6.1-6RHSA-2024:6211
RHODF-4.14-RHEL-9odf4/mcg-core-rhel9:v4.14.11-1RHSA-2024:7624
RHODF-4.14-RHEL-9odf4/ocs-client-console-rhel9:v4.14.18-2RHSA-2025:8551
RHODF-4.15-RHEL-9odf4/ocs-client-console-rhel9:v4.15.14-2RHSA-2025:8544
UbuntuMEDIUM

Frequently Asked Questions

### 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`](https://github.com/pillarjs/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 all
O3 Security · Impact-Aware SCA

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.

CVE-2024-29041: express (Medium 6.1) | O3 Security