CVE-2024-29041
MEDIUM 6.1CVSS 3.1Express.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.
- Published
- 25 Mar 2024
- Last modified
- 10 Sep 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-1286CWE-601
- Also known as
- GHSA-rv95-896h-c2vc
- Sources
- NVDJSONOSV GHSA-rv95-896h-c2vcJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | openjsf | expresscpe:2.3:a:openjsf:express:*:*:*:*:*:node.js:*:* |
< 4.19.2 | 4.19.2 |
| NVD | openjsf | expresscpe:2.3:a:openjsf:express:5.0.0:alpha1:*:*:*:node.js:*:* |
= 5.0.0 | |
| NVD | openjsf | expresscpe:2.3:a:openjsf:express:5.0.0:alpha2:*:*:*:node.js:*:* |
= 5.0.0 | |
| NVD | openjsf | expresscpe:2.3:a:openjsf:express:5.0.0:alpha3:*:*:*:node.js:*:* |
= 5.0.0 | |
| NVD | openjsf | expresscpe:2.3:a:openjsf:express:5.0.0:alpha4:*:*:*:node.js:*:* |
= 5.0.0 | |
| NVD | openjsf | expresscpe:2.3:a:openjsf:express:5.0.0:alpha5:*:*:*:node.js:*:* |
= 5.0.0 | |
| NVD | openjsf | expresscpe:2.3:a:openjsf:express:5.0.0:alpha6:*:*:*:node.js:*:* |
= 5.0.0 | |
| NVD | openjsf | expresscpe:2.3:a:openjsf:express:5.0.0:alpha7:*:*:*:node.js:*:* |
= 5.0.0 | |
| NVD | openjsf | expresscpe:2.3:a:openjsf:express:5.0.0:alpha8:*:*:*:node.js:*:* |
= 5.0.0 | |
| NVD | openjsf | expresscpe:2.3:a:openjsf:express:5.0.0:beta1:*:*:*:node.js:*:* |
= 5.0.0 | |
| NVD | openjsf | expresscpe:2.3:a:openjsf:express:5.0.0:beta2:*:*:*:node.js:*:* |
= 5.0.0 | |
| OSV | npm | express | < 4.19.2 | 4.19.2 |
| OSV | npm | express | >= 5.0.0-alpha.1, < 5.0.0-beta.3 | 5.0.0-beta.3 |
References
- https://expressjs.com/en/4x/api.html#res.location · Technical Description, WEB
- https://github.com/expressjs/express/commit/0867302ddbde0e9463d0564fea5861feb708c2dd · Patch, WEB
- https://github.com/expressjs/express/commit/0b746953c4bd8e377123527db11f9cd866e39f94 · Patch, WEB
- https://github.com/expressjs/express/pull/5539 · Issue Tracking, WEB
- https://github.com/expressjs/express/security/advisories/GHSA-rv95-896h-c2vc · Patch, Vendor Advisory, WEB
- https://github.com/koajs/koa/issues/1800 · Issue Tracking, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2024-29041 · ADVISORY
- https://github.com/expressjs/express · PACKAGE
History
- 25 Nov 2026 20:55 UTC · NVD: first stored (published 25 Mar 2024)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 25 Mar 2024)