CVE-2022-24794: CWE-601: URL Redirection to Untrusted Site ('Open Redirect') in auth0 express-openid-connect
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 Analysis
Technical Summary
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.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Italy, Spain, Belgium
CVE-2022-24794: CWE-601: URL Redirection to Untrusted Site ('Open Redirect') in auth0 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
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.
Affected Countries
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 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.