{"id":"CVE-2024-29041","published":"2024-03-25T20:20:06Z","modified":"2024-08-02T01:03:51Z","title":"Express.js Open Redirect in malformed URLs","vendor":"expressjs","product":"express","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.1,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00921,"percentile":0.58526,"provenance":"source"},"cwes":[{"id":"CWE-601","name":"URL Redirection to Untrusted Site"},{"id":"CWE-1286","name":"Improper Validation of Syntactic Correctness of Input"}],"references":[{"url":"https://github.com/expressjs/express/security/advisories/GHSA-rv95-896h-c2vc","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/koajs/koa/issues/1800","tags":["x_refsource_MISC"]},{"url":"https://github.com/expressjs/express/pull/5539","tags":["x_refsource_MISC"]},{"url":"https://github.com/expressjs/express/commit/0867302ddbde0e9463d0564fea5861feb708c2dd","tags":["x_refsource_MISC"]},{"url":"https://github.com/expressjs/express/commit/0b746953c4bd8e377123527db11f9cd866e39f94","tags":["x_refsource_MISC"]},{"url":"https://expressjs.com/en/4x/api.html#res.location","tags":["x_refsource_MISC"]}],"priority":{"score":16.0,"factors":[{"name":"EPSS percentile","points":11.71},{"name":"CVSS severity","points":4.27}]},"vendorSlug":"expressjs","affectedVersions":[{"vendor":"expressjs","product":"express","versions":[">=4.14.0, <4.19.0",">=5.0.0-alpha.1, <5.0.0-beta.3"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2024-03-26T13:59:28.274744Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"express","vulnerableRanges":["<4.19.2",">=5.0.0-alpha.1, <5.0.0-beta.3"],"patched":["4.19.2","5.0.0-beta.3"],"from":["GHSA-rv95-896h-c2vc"],"provenance":"source"}],"summary":{"text":"The Express.js minimalist web framework for Node.js has an open redirect flaw in its res.location() method, which res.redirect() also calls, where user-provided URLs are encoded in a way that common allow-list checks in Express applications can misinterpret. An attacker who can get a user to interact with a crafted malformed URL, with no authentication required, can bypass a properly implemented redirect allow list and send the victim to an untrusted site.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:29:53Z"},"euvd":{"id":"EUVD-2024-1007","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-expressjs-express-cve-2024-29041","children":[{"from":"CVE-2024-29041","to":"CVE-2024-43796","relation":"successor","confidence":"high","kind":"lineage","evidence":[{"kind":"version-step","provenance":"source","package":"npm:express","fromFixed":"4.19.2","toFixed":"4.20.0","daysApart":169},{"kind":"version-step","provenance":"source","package":"npm:express","fromFixed":"5.0.0-beta.3","toFixed":"5.0.0","daysApart":169},{"kind":"same-code","provenance":"machine","files":["lib/response.js"],"commits":["https://github.com/expressjs/express/commit/0867302ddbde0e9463d0564fea5861feb708c2dd","https://github.com/expressjs/express/commit/0b746953c4bd8e377123527db11f9cd866e39f94","https://github.com/expressjs/express/commit/54271f69b511fea198471e6ff3400ab805d6b553"],"basis":"rarely changed file"}]}],"packageHistory":[{"cve":"CVE-2024-10491","published":"2024-10-29","fixed":"4.0.0-rc1","kev":false},{"cve":"CVE-2024-9266","published":"2024-10-03","fixed":"4.0.0-rc1","kev":false},{"cve":"CVE-2014-6393","published":"2017-08-09","fixed":"4.5.0","kev":false},{"cve":"CVE-2024-29041","published":"2024-03-25","fixed":"5.0.0-beta.3","kev":false},{"cve":"CVE-2024-43796","published":"2024-09-10","fixed":"5.0.0","kev":false}],"package":"npm:express"}}