Every CVE Search/ Get API key

CVE-2024-29041

Express.js Open Redirect in malformed URLs

6.1 MediumFix available

Express.js minimalist web framework for node. Versions of Express.js prior to 4.19.0 and all pre-release alpha and beta versions of 5.0 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(). The vulnerability is fixed in 4.19.2 and 5.0.0-beta.3.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
Required

What an attacker can affect

Confidentiality
Low
Integrity
Low
Availability
None

Exploit likelihood

0.79%Up 0.7 points since Mar 26, 2024
90%50%10%1%

What each source reports

CVE List Score used 6.1

Express.js Open Redirect in malformed URLs

Express.js minimalist web framework for node. Versions of Express.js prior to 4.19.0 and all pre-release alpha and beta versions of 5.0 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(). The vulnerability is fixed in 4.19.2 and 5.0.0-beta.3.

Record
CVE-2024-29041
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-601, CWE-1286
Updated
2026-11-02
EUVDEUVD-2024-1007 6.1

Express.js minimalist web framework for node. Versions of Express.js prior to 4.19.0 and all pre-release alpha and beta versions of 5.0 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(). The vulnerability is fixed in 4.19.2 and 5.0.0-beta.3.

Record
EUVD-2024-1007
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Updated
2026-11-03
GitHub AdvisoriesGHSA-rv95-896h-c2vc 6.1

Express.js Open Redirect in malformed URLs

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

Record
GHSA-rv95-896h-c2vc
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-601, CWE-1286
Updated
2026-11-02
NVD 6.1

Express.js minimalist web framework for node. Versions of Express.js prior to 4.19.0 and all pre-release alpha and beta versions of 5.0 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(). The vulnerability is fixed in 4.19.2 and 5.0.0-beta.3.

Record
CVE-2024-29041
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-601, CWE-1286
Updated
2026-11-02
OSV 6.1

Express.js Open Redirect in malformed URLs

Express.js minimalist web framework for node. Versions of Express.js prior to 4.19.0 and all pre-release alpha and beta versions of 5.0 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(). The vulnerability is fixed in 4.19.2 and 5.0.0-beta.3.

Record
CVE-2024-29041
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-1286, CWE-601
Updated
2026-11-02
OSVDEBIAN-CVE-2024-29041 6.1

Express.js minimalist web framework for node. Versions of Express.js prior to 4.19.0 and all pre-release alpha and beta versions of 5.0 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(). The vulnerability is fixed in 4.19.2 and 5.0.0-beta.3.

Record
DEBIAN-CVE-2024-29041
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Updated
2026-11-02
Show 15 moreShow less
OSVGHSA-rv95-896h-c2vc 6.1

Express.js Open Redirect in malformed URLs

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

Record
GHSA-rv95-896h-c2vc
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-1286, CWE-601
Updated
2026-11-02
OSVUBUNTU-CVE-2024-29041 6.1

Express.js minimalist web framework for node. Versions of Express.js prior to 4.19.0 and all pre-release alpha and beta versions of 5.0 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(). The vulnerability is fixed in 4.19.2 and 5.0.0-beta.3.

Record
UBUNTU-CVE-2024-29041
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Updated
2026-11-02
OSVAZL-37137 No score

CVE-2024-29041 affecting package reaper for versions less than 3.1.1-9

Express.js minimalist web framework for node. Versions of Express.js prior to 4.19.0 and all pre-release alpha and beta versions of 5.0 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(). The vulnerability is fixed in 4.19.2 and 5.0.0-beta.3.

Record
AZL-37137
Updated
2026-11-02
OSVAZL-43690 No score

CVE-2024-29041 affecting package nodejs-nodemon 2.0.3-4

Express.js minimalist web framework for node. Versions of Express.js prior to 4.19.0 and all pre-release alpha and beta versions of 5.0 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(). The vulnerability is fixed in 4.19.2 and 5.0.0-beta.3.

Record
AZL-43690
Updated
2026-11-02
OSVAZL-44361 No score

CVE-2024-29041 affecting package nodejs-nodemon 2.0.3-5

Express.js minimalist web framework for node. Versions of Express.js prior to 4.19.0 and all pre-release alpha and beta versions of 5.0 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(). The vulnerability is fixed in 4.19.2 and 5.0.0-beta.3.

Record
AZL-44361
Updated
2026-11-05
OSVCLSA-2026-1773015274 No score

TuxCare security update for express (4 CVEs)

TuxCare rebuilt express to address 4 CVEs. Fixed in 3.21.2-tuxcare.1.

Record
CLSA-2026-1773015274
Updated
2026-11-02
OSVCLSA-2026-1781484856 No score

TuxCare security update for express (3 CVEs)

TuxCare rebuilt express to address 3 CVEs. Fixed in 3.4.8-tuxcare.1.

Record
CLSA-2026-1781484856
Updated
2026-11-05
OSVCLSA-2026-1781571273 No score

TuxCare security update for express (2 CVEs)

TuxCare rebuilt express to address 2 CVEs. Fixed in 4.17.1-tuxcare.1.

Record
CLSA-2026-1781571273
Updated
2026-11-02
OSVCLSA-2026-1781571275 No score

TuxCare security update for express (2 CVEs)

TuxCare rebuilt express to address 2 CVEs. Fixed in 4.18.1-tuxcare.1.

Record
CLSA-2026-1781571275
Updated
2026-11-02
OSVCLSA-2026-1781571277 No score

TuxCare security update for express (2 CVEs)

TuxCare rebuilt express to address 2 CVEs. Fixed in 4.18.2-tuxcare.1.

Record
CLSA-2026-1781571277
Updated
2026-11-02
OSVCLSA-2026-1781571278 No score

TuxCare security update for express (2 CVEs)

TuxCare rebuilt express to address 2 CVEs. Fixed in 4.18.3-tuxcare.1.

Record
CLSA-2026-1781571278
Updated
2026-11-02
OSVCLSA-2026-1792597284 No score

TuxCare security update for express (2 CVEs)

TuxCare rebuilt express to address 2 CVEs. Fixed in 3.1.2-tuxcare.2.

Record
CLSA-2026-1792597284
Updated
2026-11-02
OSVCLSA-2026-1792597402 No score

TuxCare security update for express (1 CVE)

TuxCare rebuilt express to address 1 CVE. Fixed in 4.16.3-tuxcare.2.

Record
CLSA-2026-1792597402
Updated
2026-11-02
OSVROOT-APP-NPM-CVE-2024-29041 No score

CVE-2024-29041 in @rootio/express - Patched by Root

Root has patched CVE-2024-29041 in the @rootio/express package for Root:npm. Multiple fixed versions available.

Record
ROOT-APP-NPM-CVE-2024-29041
Updated
2026-11-02
OSVUSN-7581-1 No score

node-express vulnerabilities

It was discovered that Express incorrectly handled certain URLs, leading to an open redirect attack. A remote attacker could possibly use this issue to perform phishing attacks. (CVE-2024-29041)

Adam Korcz discovered that Express did not properly sanitize certain inputs. A remote attacker could possibly use this issue to perform cross site scripting. (CVE-2024-43796)

Record
USN-7581-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
express
npm
before 4.19.2
4.19.2
express
npm
5.0.0-alpha.1 up to 5.0.0-beta.3
5.0.0-beta.3
reaper
Azure Linux:2
before 3.1.1-9
3.1.1-9
nodejs-nodemon
Azure Linux:2
through 2.0.3-4 None known
nodejs-nodemon
Azure Linux:3
through 2.0.3-5 None known
express
TuxCare:npm
From an advisory covering 4 CVEs
3.21.2-tuxcare.0 up to 3.21.2-tuxcare.1, plus listed versions
3.21.2
3.21.2-tuxcare.1
express
TuxCare:npm
From an advisory covering 3 CVEs
3.4.8-tuxcare.0 up to 3.4.8-tuxcare.1, plus listed versions
3.4.8
3.4.8-tuxcare.1
express
TuxCare:npm
From an advisory covering 2 CVEs
4.17.1-tuxcare.0 up to 4.17.1-tuxcare.1, plus listed versions
4.17.1
4.17.1-tuxcare.1
express
TuxCare:npm
From an advisory covering 2 CVEs
4.18.1-tuxcare.0 up to 4.18.1-tuxcare.1, plus listed versions
4.18.1
4.18.1-tuxcare.1
express
TuxCare:npm
From an advisory covering 2 CVEs
4.18.2-tuxcare.0 up to 4.18.2-tuxcare.1, plus listed versions
4.18.2
4.18.2-tuxcare.1
Show 17 moreShow less
Affected packages
PackageAffectedFixed
express
TuxCare:npm
From an advisory covering 2 CVEs
4.18.3-tuxcare.0 up to 4.18.3-tuxcare.1, plus listed versions
4.18.3
4.18.3-tuxcare.1
express
TuxCare:npm
From an advisory covering 2 CVEs
3.1.2-tuxcare.0 up to 3.1.2-tuxcare.2, plus listed versions
3.1.23.1.2-tuxcare.1
3.1.2-tuxcare.2
express
TuxCare:npm
4.16.3-tuxcare.0 up to 4.16.3-tuxcare.2, plus listed versions
4.16.34.16.3-tuxcare.1
4.16.3-tuxcare.2
node-express
Debian:12
All versions, plus listed versions
4.18.2+~4.17.14-14.18.2+~cs8.34.50-14.19.2+~cs8.36.21-14.19.2+~cs8.36.26-14.21.0+~cs8.36.26-1
Show 6 moreShow less
4.21.0+~cs8.36.26-24.21.2+~cs8.36.27-14.21.2+~cs8.36.27-24.21.2+~cs8.36.27-35.1.0+~cs12.3.3-15.2.1+~cs12.3.9-1
None known
node-express
Debian:13
before 4.19.2+~cs8.36.21-1
4.19.2+~cs8.36.21-1
node-express
Debian:14
before 4.19.2+~cs8.36.21-1
4.19.2+~cs8.36.21-1
@rootio/express
Root:npm
before 4.18.2-root.io.2
4.18.2-root.io.24.18.2-root.io.3
express
Root:npm
before 4.18.2-aikido.3
4.18.2-aikido.3
node-express
Ubuntu:Pro:16.04:LTS
before 4.1.1~dfsg-1ubuntu0.16.04.1~esm1, plus listed versions
4.1.1~dfsg-1
4.1.1~dfsg-1ubuntu0.16.04.1~esm1
node-express
Ubuntu:Pro:18.04:LTS
before 4.1.1~dfsg-1ubuntu0.18.04.1~esm1, plus listed versions
4.1.1~dfsg-1
4.1.1~dfsg-1ubuntu0.18.04.1~esm1
node-express
Ubuntu:Pro:20.04:LTS
before 4.17.1-2ubuntu0.1~esm1, plus listed versions
4.17.1-14.17.1-2
4.17.1-2ubuntu0.1~esm1
node-express
Ubuntu:Pro:22.04:LTS
before 4.17.3+~4.17.13-1ubuntu0.1~esm1, plus listed versions
4.17.1-34.17.1+~cs4.17.13-14.17.2+~4.17.13-14.17.3+~4.17.13-1
4.17.3+~4.17.13-1ubuntu0.1~esm1
node-express
Ubuntu:Pro:16.04:LTS
From an advisory covering 2 CVEs
before 4.1.1~dfsg-1ubuntu0.16.04.1~esm1, plus listed versions
4.1.1~dfsg-1
4.1.1~dfsg-1ubuntu0.16.04.1~esm1
node-express
Ubuntu:Pro:18.04:LTS
From an advisory covering 2 CVEs
before 4.1.1~dfsg-1ubuntu0.18.04.1~esm1, plus listed versions
4.1.1~dfsg-1
4.1.1~dfsg-1ubuntu0.18.04.1~esm1
node-express
Ubuntu:Pro:20.04:LTS
From an advisory covering 2 CVEs
before 4.17.1-2ubuntu0.1~esm1, plus listed versions
4.17.1-14.17.1-2
4.17.1-2ubuntu0.1~esm1
node-express
Ubuntu:Pro:22.04:LTS
From an advisory covering 2 CVEs
before 4.17.3+~4.17.13-1ubuntu0.1~esm1, plus listed versions
4.17.1-34.17.1+~cs4.17.13-14.17.2+~4.17.13-14.17.3+~4.17.13-1
4.17.3+~4.17.13-1ubuntu0.1~esm1
node-express
Ubuntu:Pro:24.04:LTS
From an advisory covering 2 CVEs
before 4.19.2+~cs8.36.21-1ubuntu0.1~esm1, plus listed versions
4.18.2+~cs8.34.50-14.19.2+~cs8.36.21-1
4.19.2+~cs8.36.21-1ubuntu0.1~esm1

History

History
RecordedChangedSources
affected
factsOSV
aliases, productsEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2024-29041 is a medium vulnerability (CVSS 6.1) in @clerk Express, published March 25, 2024. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.79%, the 56th percentile. Fixed in express 4.19.2.

References

Show 9 moreShow less
MoveEnter Open