NIST deprecates RSA-2048 from 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
Updated
Affected
2 pkgs
Patched
2 / 2
Exploits
None indexed
Exploitation data as of Nov 9, 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 CVEs56th percentile — riskier than 56% of all scored CVEsHighest risk
0.00%0.43%0.86%1.29%0.2%0.8%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

Where this sits among everything scored

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.

109Kother npm packages depend on this — each one inherits the vulnerability until it's patched upstream
expressnpm
197.2Mdownloads / 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

Affected Products

1 product · 11 configurations
Application
expressopenjsf
< 4.19.2
1 version
5.0.0

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

    Stop reflecting attacker-controlled destinations: resolve every redirect target against an allowlist of paths or hosts you own, prefer a server-side key over a full URL in the request, and reject absolute URLs entirely where the flow only ever needs a relative one.

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.

Workaround published by Red Hat
Red Hat has investigated whether a possible mitigation exists for this issue, and has not been able to identify a practical example. Please update the affected package as soon as possible.
Source: Red Hat security advisory for CVE-2024-29041 (CC BY 4.0)
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

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?

Find it across npm, including transitive dependencies.

CVE-2024-29041: express Open Redirect — Fixed in 4.19.2