Skip to content
OpenAdvisories

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.

Affected products

VendorProductAffectedFixed
expressjs express >=4.14.0, <4.19.0, >=5.0.0-alpha.1, <5.0.0-beta.3 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 node-express 4.19.2+~cs8.36.21-1 —
Debian 13 node-express 4.19.2+~cs8.36.21-1 —
Debian 12 node-express No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu Pro 24.04 LTS node-express 4.19.2+~cs8.36.21-1ubuntu0.1~esm1 USN-7581-1
Ubuntu Pro 22.04 LTS node-express 4.17.3+~4.17.13-1ubuntu0.1~esm1 USN-7581-1
Ubuntu Pro 20.04 LTS node-express 4.17.1-2ubuntu0.1~esm1 USN-7581-1
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 18.04 LTS node-express 4.1.1~dfsg-1ubuntu0.18.04.1~esm1 USN-7581-1
Ubuntu Pro 16.04 LTS node-express 4.1.1~dfsg-1ubuntu0.16.04.1~esm1 USN-7581-1

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 nodejs-nodemon No fix yet —
Azure Linux 2 (CBL-Mariner) nodejs-nodemon No fix yet —
Azure Linux 2 (CBL-Mariner) reaper 3.1.1-9 —

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling argo-workflows 3.6.5-r2 —
Wolfi rolling kubeflow-centraldashboard 1.8.0-r3 —
Wolfi rolling kubeflow-pipelines +11 2.4.0-r9 —
Wolfi rolling sqlpad +1 7.4.1-r3 —

Affected packages

EcosystemPackageAffectedFixedRecord
npm express < 4.19.2 4.19.2 GHSA-rv95-896h-c2vc
npm express >= 5.0.0-alpha.1, < 5.0.0-beta.3 5.0.0-beta.3 GHSA-rv95-896h-c2vc

Advisories 7

References