CVE-2024-29041Express.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`](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.
What to do
Fixed builds are available from Debian, npm: see the table below for the fixed version per release.
Debian, Red Hat, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.04 | node-express | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | node-express | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | node-express | Fix pending | 4.17.3+~4.17.13-1ubuntu0.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2024-29041 |
| Ubuntu 20.04 | node-express | Fix pending | 4.17.1-2ubuntu0.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2024-29041 |
| Ubuntu 18.04 | node-express | Fix pending | 4.1.1~dfsg-1ubuntu0.18.04.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2024-29041 |
| Ubuntu 16.04 | node-express | Fix pending | 4.1.1~dfsg-1ubuntu0.16.04.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2024-29041 |
| Debian 14 | node-express | Fixed | 4.19.2+~cs8.36.21-1 | DEBIAN-CVE-2024-29041 |
| Debian 13 | node-express | Fixed | 4.19.2+~cs8.36.21-1 | DEBIAN-CVE-2024-29041 |
| Debian 12 | node-express | Fix pending | DEBIAN-CVE-2024-29041 | |
| Red Hat Enterprise Linux 10 | cldr-emoji-annotation | Not affected | ||
| Red Hat Enterprise Linux 10 | cldr-emoji-annotation-dtd | Not affected | ||
| Red Hat Enterprise Linux 10 | cockpit-ha-cluster | Not affected | ||
| Red Hat Enterprise Linux 10 | pcs | Not affected | ||
| Red Hat Enterprise Linux 10 | pcs-snmp | Not affected | ||
| Red Hat Enterprise Linux 9 | cldr-emoji-annotation | Not affected | ||
| Red Hat Enterprise Linux 9 | cldr-emoji-annotation-dtd | Not affected | ||
| Red Hat Enterprise Linux 9 | gjs | Not affected | ||
| Red Hat Enterprise Linux 9 | gjs-devel | Not affected | ||
| Red Hat Enterprise Linux 9 | pcs | Not affected | ||
| Red Hat Enterprise Linux 9 | pcs-snmp | Not affected | ||
| Red Hat Enterprise Linux 9 | polkit | Not affected | ||
| Red Hat Enterprise Linux 9 | polkit-devel | Not affected | ||
| Red Hat Enterprise Linux 9 | polkit-docs | Not affected | ||
| Red Hat Enterprise Linux 9 | polkit-libs | Not affected | ||
| Red Hat Enterprise Linux 8 | cldr-emoji-annotation | Fix pending Affected | ||
| Red Hat Enterprise Linux 8 | mozjs60 | Not affected | ||
| Red Hat Enterprise Linux 8 | mozjs60-devel | Not affected | ||
| Red Hat Enterprise Linux 8 | pcs | Not affected | ||
| Red Hat Enterprise Linux 8 | pcs-snmp | Not affected | ||
| Red Hat Enterprise Linux 7 | firefox | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | thunderbird | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | firefox | Fix pending Affected | ||
| Red Hat Enterprise Linux 6 | thunderbird | Fix pending Affected | ||
| npm library | express | Fixed | 5.0.0-beta.3 | GHSA-rv95-896h-c2vc |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- expressjs express: affected: >=4.14.0, <4.19.0, >=5.0.0-alpha.1, <5.0.0-beta.3
References
- https://github.com/expressjs/express/security/advisories/GHSA-rv95-896h-c2vc
- https://github.com/koajs/koa/issues/1800
- https://github.com/expressjs/express/pull/5539
- https://github.com/expressjs/express/commit/0867302ddbde0e9463d0564fea5861feb708c2dd
- https://github.com/expressjs/express/commit/0b746953c4bd8e377123527db11f9cd866e39f94
- https://expressjs.com/en/4x/api.html#res.location
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.