{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2024-29041","id":"CVE-2024-29041","title":"Express.js Open Redirect in malformed URLs","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","descriptionLong":"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.","published":"2024-03-25T20:20:06.205Z","updated":"2026-10-28T02:30:43.392891435Z","reserved":"2024-03-14T16:59:47.614Z","status":"Analyzed","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"GitHub_M"},"metrics":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"GitHub_M"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"github.com"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"OSV"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"GitHub"}],"rating":"medium","products":["expressjs express"],"affectedProducts":[{"vendor":"expressjs","product":"express","defaultStatus":null,"versions":[{"version":">=4.14.0, <4.19.0","status":"affected"},{"version":">=5.0.0-alpha.1, <5.0.0-beta.3","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"npm","name":"express","purl":"pkg:npm/express","ranges":["<4.19.2",">=5.0.0-alpha.1 <5.0.0-beta.3"],"fixed":["4.19.2","5.0.0-beta.3"],"advisory":"GHSA-rv95-896h-c2vc"}],"cwes":["CWE-601","CWE-1286"],"aliases":["GHSA-rv95-896h-c2vc"],"references":[{"url":"https://github.com/expressjs/express/security/advisories/GHSA-rv95-896h-c2vc","tags":["x_refsource_CONFIRM","x_transferred","Patch","Vendor Advisory","advisory","web"]},{"url":"https://github.com/koajs/koa/issues/1800","tags":["x_refsource_MISC","x_transferred","Issue Tracking","report","web"]},{"url":"https://github.com/expressjs/express/pull/5539","tags":["x_refsource_MISC","x_transferred","Issue Tracking","fix","web"]},{"url":"https://github.com/expressjs/express/commit/0867302ddbde0e9463d0564fea5861feb708c2dd","tags":["x_refsource_MISC","x_transferred","Patch","fix","web"]},{"url":"https://github.com/expressjs/express/commit/0b746953c4bd8e377123527db11f9cd866e39f94","tags":["x_refsource_MISC","x_transferred","Patch","fix","web"]},{"url":"https://expressjs.com/en/4x/api.html#res.location","tags":["x_refsource_MISC","x_transferred","Technical Description","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/29xxx/CVE-2024-29041.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-29041","tags":["advisory"]},{"url":"https://github.com/expressjs/express","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.00786,"epssPercentile":0.56896,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2024-29041","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-29041","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2024-29041","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-rv95-896h-c2vc","ok":true,"note":"GHSA-rv95-896h-c2vc"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2024-29041","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}