CVEfocus › CVE database › CVE-2024-29041

CVE-2024-29041Express.js Open Redirect in malformed URLs

CVSS 6.1 MediumEPSS 0.9% (higher than 59% of CVEs)Published 2024-03-25Updated 2024-08-02Assigner: GitHub_M

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.

CWE-1286CWE-601

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

3Fixed
8Fix pending
2Will not fix
21Not affected

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.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04node-expressNot affected
vulnerable_code_not_present
Ubuntu 25.10node-expressNot affected
vulnerable_code_not_present
Ubuntu 22.04node-expressFix pending4.17.3+~4.17.13-1ubuntu0.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2024-29041
Ubuntu 20.04node-expressFix pending4.17.1-2ubuntu0.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2024-29041
Ubuntu 18.04node-expressFix pending4.1.1~dfsg-1ubuntu0.18.04.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2024-29041
Ubuntu 16.04node-expressFix pending4.1.1~dfsg-1ubuntu0.16.04.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2024-29041
Debian 14node-expressFixed4.19.2+~cs8.36.21-1DEBIAN-CVE-2024-29041
Debian 13node-expressFixed4.19.2+~cs8.36.21-1DEBIAN-CVE-2024-29041
Debian 12node-expressFix pendingDEBIAN-CVE-2024-29041
Red Hat Enterprise Linux 10cldr-emoji-annotationNot affected
Red Hat Enterprise Linux 10cldr-emoji-annotation-dtdNot affected
Red Hat Enterprise Linux 10cockpit-ha-clusterNot affected
Red Hat Enterprise Linux 10pcsNot affected
Red Hat Enterprise Linux 10pcs-snmpNot affected
Red Hat Enterprise Linux 9cldr-emoji-annotationNot affected
Red Hat Enterprise Linux 9cldr-emoji-annotation-dtdNot affected
Red Hat Enterprise Linux 9gjsNot affected
Red Hat Enterprise Linux 9gjs-develNot affected
Red Hat Enterprise Linux 9pcsNot affected
Red Hat Enterprise Linux 9pcs-snmpNot affected
Red Hat Enterprise Linux 9polkitNot affected
Red Hat Enterprise Linux 9polkit-develNot affected
Red Hat Enterprise Linux 9polkit-docsNot affected
Red Hat Enterprise Linux 9polkit-libsNot affected
Red Hat Enterprise Linux 8cldr-emoji-annotationFix pending
Affected
Red Hat Enterprise Linux 8mozjs60Not affected
Red Hat Enterprise Linux 8mozjs60-develNot affected
Red Hat Enterprise Linux 8pcsNot affected
Red Hat Enterprise Linux 8pcs-snmpNot affected
Red Hat Enterprise Linux 7firefoxWill not fix
Will not fix
Red Hat Enterprise Linux 7thunderbirdWill not fix
Will not fix
Red Hat Enterprise Linux 6firefoxFix pending
Affected
Red Hat Enterprise Linux 6thunderbirdFix pending
Affected
npm libraryexpressFixed5.0.0-beta.3GHSA-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.

References

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.