CVE-2022-24794 Open Redirect in express-openid-connect

High 7.5 Published Updated

An open redirect vulnerability in express-openid-connect allows attackers to redirect users to malicious sites after login when using catch-all routes.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2022-24794?

CVE-2022-24794 is a high-severity vulnerability in auth0 express-openid-connect, published on 31 Mar 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Weakness: CWE-601

Which versions are affected by CVE-2022-24794?

2 open source packages ship an affected version, including express-openid-connect. It affects 1 product.

PackageAffectedFixed in
express-openid-connect npmAll versions2.7.2
express-openid-connect npmAll versions2.7.2

Products include Auth0 Express Openid Connect.

How do I fix CVE-2022-24794?

Upgrade express-openid-connect to 2.7.2 or later.

Is CVE-2022-24794 being exploited?

There is no known exploitation of CVE-2022-24794 in the wild and no public exploit code.

Sources

Also known as GHSA-7p99-3798-f85c.

Is CVE-2022-24794 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free