7.5high
Open Redirect in express-openid-connect
- Severity
- 7.5high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.74% (higher than 55% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-7p99-3798-f85c
Description
Express OpenID Connect is an Express JS middleware implementing sign on for Express web apps using OpenID Connect. Users of the `requiresAuth` middleware, either directly or through the default `authRequired` option, are vulnerable to an Open Redirect when the middleware is applied to a catch all route. If all routes under `example.com` are protected with the `requiresAuth` middleware, a visit to `http://example.com//google.com` will be redirected to `google.com` after login because the original url reported by the Express framework is not properly sanitized. This vulnerability affects versions prior to 2.7.2. Users are advised to upgrade. There are no known workarounds.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| auth0 express-openid-connect | < 2.7.2 | CVE List |
| express-openid-connect (npm) | before 2.7.2 | GitHub Advisory Database |
| auth0 express_openid_connect | before 2.7.2 | NVD |
All scores
| GitHub_M | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:N |
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:N |
| NVD | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | 5.8medium CVSS:2.0 | AV:N/AC:M/Au:N/C:P/I:P/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
Express OpenID Connect is an Express JS middleware implementing sign on for Express web apps using OpenID Connect. Users of the `requiresAuth` middleware, either directly or through the default `authRequired` option, are vulnerable to an Open Redirect when the middleware is applied to a catch all route. If all routes under `example.com` are protected with the `requiresAuth` middleware, a visit to `http://example.com//google.com` will be redirected to `google.com` after login because the original url reported by the Express framework is not properly sanitized. This vulnerability affects versions prior to 2.7.2. Users are advised to upgrade. There are no known workarounds.
GitHub Advisory Database
Impact
Users of the requiresAuth middleware, either directly or through the default authRequired option, are vulnerable to an Open Redirect when the middleware is applied to a catch all route.
If all routes under example.com are protected with the requiresAuth middleware, a visit to http://example.com//google.com will be redirected to google.com after login because the original url reported by the Express framework is not properly sanitised.
Am I affected?
You are affected by this vulnerability if you are using the requiresAuth middleware on a catch all route or the default authRequired option and express-openid-connect version <=2.7.1.
How to fix that?
Upgrade to version >=2.7.2
Will this update impact my users?
The fix provided in the patch will not affect your users.
NVD (es)
Express OpenID Connect es un middleware de Express JS que implementa el inicio de sesión para las aplicaciones web de Express usando OpenID Connect. Los usuarios del middleware "requiresAuth", ya sea directamente o mediante la opción por defecto "authRequired", son vulnerables a un Redireccionamiento Abierto cuando el middleware es aplicado a una ruta catch all. Si todas las rutas bajo "example.com" están protegidas con el middleware "requiresAuth", una visita a "http://example.com//google.com" será redirigida a "google.com" después del inicio de sesión porque la url original reportada por el framework Express no está correctamente saneada. Esta vulnerabilidad afecta a versiones anteriores a 2.7.2. Es recomendado a usuarios actualizar. No se presentan medidas de mitigación conocidas
References
| https://github.com/auth0/express-openid-connect/security/advisories/GHSA-7p99-3798-f85c | third-party-advisory, web | |
| https://github.com/auth0/express-openid-connect/commit/0947b92164a2c5f661ebcc183d37e7f21de719ad | patch, third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2022-24794 | advisory | |
| https://github.com/auth0/express-openid-connect | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-24794 changed 2025-04-23 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-7p99-3798-f85c changed 2023-11-08 | CC-BY-4.0 |
| NVD | CVE-2022-24794 changed 2026-06-17 | Public domain |