CVE-2024-29041
published medium CVSS 3.1 · 6.1Express.js Open Redirect in malformed URLs
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| expressjs | — | express>=4.14.0, <4.19.0 · >=5.0.0-alpha.1, <5.0.0-beta.3 | Affected | Not stated | GitHub_M |
| Ubuntu | bionic | node-express | Advisory build | 4.1.1~dfsg-1ubuntu0.18.04.1~esm1 | USN-7581-1 |
| Ubuntu | focal | node-express | Advisory build | 4.17.1-2ubuntu0.1~esm1 | USN-7581-1 |
| Ubuntu | jammy | node-express | Advisory build | 4.17.3+~4.17.13-1ubuntu0.1~esm1 | USN-7581-1 |
| Ubuntu | xenial | node-express | Advisory build | 4.1.1~dfsg-1ubuntu0.16.04.1~esm1 | USN-7581-1 |
Description
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`](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 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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 6.1 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| expressjs | express | >=4.14.0, <4.19.0 (affected)>=5.0.0-alpha.1, <5.0.0-beta.3 (affected) | GitHub_M · cna |
Weaknesses
2- CWE-601 CWE-601: URL Redirection to Untrusted Site ('Open Redirect')
- CWE-1286 CWE-1286: Improper Validation of Syntactic Correctness of Input
References
6- https://expressjs.com/en/4x/api.html#res.location
- https://github.com/expressjs/express/commit/0867302ddbde0e9463d0564fea5861feb708c2dd
- https://github.com/expressjs/express/commit/0b746953c4bd8e377123527db11f9cd866e39f94
- https://github.com/expressjs/express/pull/5539
- https://github.com/expressjs/express/security/advisories/GHSA-rv95-896h-c2vc
- https://github.com/koajs/koa/issues/1800
Provider assertions
3GitHub_M · cna
Express.js Open Redirect in malformed URLs
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 3401eb4adf6a6214e61e568ade18522f05947892e78b06c6bde76ac186603c3f
- Ingested
- 23 Sep 2026, 08:21:14 UTC
- Source record
- Official CVE record