{"cve":"CVE-2024-29041","nvd":{"published":"2024-03-25T21:15:46.847","modified":"2026-06-17T07:22:18.493","status":"Analyzed","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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1},"cwes":["CWE-601","CWE-1286"],"references":["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"],"products":["openjsf:express"],"source":"nvd","synced_at":"2026-10-19T21:47:51.568503435+00:00"},"epss":{"cve":"CVE-2024-29041","score":0.00786,"percentile":0.56127,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-rv95-896h-c2vc","url":"https://osv.dev/vulnerability/GHSA-rv95-896h-c2vc","summary":"Express.js Open Redirect in malformed URLs","modified":"2026-09-10T03:50:10.750068508Z","packages":[{"ecosystem":"npm","name":"express","purl":"pkg:npm/express","ranges":["<4.19.2"],"fixed":["4.19.2"]},{"ecosystem":"npm","name":"express","purl":"pkg:npm/express","ranges":[">=5.0.0-alpha.1 <5.0.0-beta.3"],"fixed":["5.0.0-beta.3"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}