CVE-2022-24794
JSON

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 packageVersionsReported by
auth0 express-openid-connect< 2.7.2CVE List
express-openid-connect (npm)before 2.7.2GitHub Advisory Database
auth0 express_openid_connectbefore 2.7.2NVD

All scores

GitHub_M7.5high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:N
GitHub7.5high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:N
NVD6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
NVD5.8medium CVSS:2.0AV:N/AC:M/Au:N/C:P/I:P/A:N

Classification

CWE-601

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

Sources

SourceRecordLicence
CVE ListCVE-2022-24794 changed 2025-04-23CVE Terms of Use
GitHub Advisory DatabaseGHSA-7p99-3798-f85c changed 2023-11-08CC-BY-4.0
NVDCVE-2022-24794 changed 2026-06-17Public domain