Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2022-24794: CWE-601: URL Redirection to Untrusted Site ('Open Redirect') in auth0 express-openid-connect

0
Medium
Published: Thu Mar 31 2022 (03/31/2022, 22:45:14 UTC)
Source: CVE
Vendor/Project: auth0
Product: express-openid-connect

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.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 06/23/2025, 11:36:37 UTC

Technical Analysis

CVE-2022-24794 is a security vulnerability classified as an Open Redirect (CWE-601) found in the express-openid-connect middleware developed by Auth0 for Express.js applications. This middleware facilitates user authentication via OpenID Connect in Express web applications. The vulnerability arises when the `requiresAuth` middleware is applied broadly, such as on a catch-all route protecting all endpoints under a domain (e.g., example.com). In such configurations, the middleware improperly handles and sanitizes the original URL reported by the Express framework. Specifically, if a user visits a URL like `http://example.com//google.com`, after successful authentication, the middleware redirects the user to the external site `google.com` instead of remaining within the trusted domain. This occurs because the double slash causes the middleware to interpret the path as an absolute URL, leading to an open redirect to an untrusted external site. This flaw affects all versions of express-openid-connect prior to 2.7.2, and no known workarounds exist other than upgrading to a patched version. The vulnerability does not require user interaction beyond visiting a crafted URL, and no authentication bypass occurs; however, the redirect can be exploited in phishing attacks or to bypass security controls that rely on domain-based trust. There are no known exploits in the wild reported to date, but the issue is recognized and documented by authoritative sources including CISA and GitHub advisories.

Potential Impact

For European organizations, the impact of this vulnerability primarily revolves around the risk of phishing, social engineering, and potential loss of user trust. Attackers can craft URLs that appear to originate from a legitimate corporate domain but redirect users to malicious external sites after authentication, potentially leading to credential theft, malware distribution, or session hijacking. This can undermine the integrity of authentication flows and damage brand reputation. Organizations relying on express-openid-connect for user authentication in customer-facing or internal applications may see increased risk of targeted phishing campaigns exploiting this redirect behavior. While the vulnerability does not directly compromise confidentiality or integrity of data, the indirect consequences of successful phishing or redirection attacks can lead to credential compromise and unauthorized access. Additionally, regulatory compliance under GDPR may be impacted if user data is exposed due to subsequent attacks leveraging this vulnerability. The lack of known exploits reduces immediate risk, but the ease of exploitation via crafted URLs means the threat could be weaponized quickly if attackers develop exploit kits or phishing campaigns.

Mitigation Recommendations

The primary and most effective mitigation is to upgrade express-openid-connect to version 2.7.2 or later, where the vulnerability has been addressed by proper sanitization of the original URL. Organizations should audit their usage of the `requiresAuth` middleware, especially if applied globally or on catch-all routes, to ensure that URL handling does not allow open redirects. As an additional measure, implement strict Content Security Policy (CSP) headers to restrict navigation to trusted domains and monitor authentication logs for unusual redirect patterns. Web Application Firewalls (WAFs) can be configured to detect and block suspicious redirect URLs containing double slashes or external domains in redirect parameters. Security teams should educate users about the risks of clicking on unexpected links, even if they appear to originate from trusted domains. Finally, conduct regular security assessments and penetration testing focusing on authentication flows to detect similar redirect issues.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.1
Assigner Short Name
GitHub_M
Date Reserved
2022-02-10T00:00:00.000Z
Cisa Enriched
true

Threat ID: 682d9843c4522896dcbf2bb9

Added to database: 5/21/2025, 9:09:23 AM

Last enriched: 6/23/2025, 11:36:37 AM

Last updated: 3/25/2026, 5:57:16 AM

Views: 57

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses