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
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| 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.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| 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
- WID-SEC-2025-0168 Oracle JD Edwards: Mehrere Schwachstellen BSI CERT-Bund (WID) · Oct 11, 2026
- WID-SEC-2024-2036 Red Hat OpenShift: Mehrere Schwachstellen ermöglichen Umgehen von Sicherheitsvorkehrungen BSI CERT-Bund (WID) · Jul 1, 2026
- USN-7581-1 node-express vulnerabilities Ubuntu Security Notices (USN) · Jun 25, 2026
- WID-SEC-2024-0956 IBM App Connect Enterprise: Mehrere Schwachstellen BSI CERT-Bund (WID) · Jan 25, 2026
- NCSC-2025-0026 Kwetsbaarheden verholpen in Oracle JD Edwards NCSC-NL (Netherlands) · Jan 22, 2025
- WID-SEC-2025-0010 HCL BigFix Server Automation: Mehrere Schwachstellen BSI CERT-Bund (WID) · Jan 5, 2025
- WID-SEC-2024-1590 HCL BigFix: Mehrere Schwachstellen BSI CERT-Bund (WID) · Dec 18, 2024
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