CVE-2024-39694: Duende IdentityServer Open Redirect vulnerability

Published Jul 31, 2024
·
Updated

Impact It is possible for an attacker to craft malicious Urls that certain functions in IdentityServer will incorrectly treat as local and trusted. If such a Url is returned as a redirect, some browsers will follow it to a third-party, untrusted site.

Note: by itself, this vulnerability does not allow an attacker to obtain user credentials, authorization codes, access tokens, refresh tokens, or identity tokens. An attacker could however exploit this vulnerability as part of a phishing attack designed to steal user credentials.

Affected Methods - In the DefaultIdentityServerInteractionService, the GetAuthorizationContextAsync method may return non-null and the IsValidReturnUrl method may return true for malicious Urls, indicating incorrectly that they can be safely redirected to.

UI code calling these two methods is the most commonly used code path that will expose the vulnerability. The default UI templates rely on this behavior in the Login, Challenge, Consent, and Account Creation pages. Customized user interface code might also rely on this behavior. The following uncommonly used APIs are also vulnerable:

- The ServerUrlExtensions.GetIdentityServerRelativeUrl, ReturnUrlParser.ParseAsync and OidcReturnUrlParser.ParseAsync methods may incorrectly return non-null, and the ReturnUrlParser.IsValidReturnUrl and OidcReturnUrlParser.IsValidReturnUrl methods may incorrectly return true for malicious Urls.

Patches This vulnerability is fixed in the following versions of Duende.IdentityServer: - 7.0.6 - 6.3.10 - 6.2.5 - 6.1.8 - 6.0.5

Duende.IdentityServer 5.1 and earlier and all versions of IdentityServer4 are no longer supported and will not be receiving updates.

Workarounds

If upgrading is not possible, use IUrlHelper.IsLocalUrl from ASP.NET Core 5.0 or later to validate return Urls in user interface code in the IdentityServer host.

Other sources

Duende IdentityServer is an OpenID Connect and OAuth 2.x framework for ASP.NET Core. It is possible for an attacker to craft malicious Urls that certain functions in IdentityServer will incorrectly treat as local and trusted. If such a Url is returned as a redirect, some browsers will follow it to a third-party, untrusted site. Note: by itself, this vulnerability does not allow an attacker to obtain user credentials, authorization codes, access tokens, refresh tokens, or identity tokens. An attacker could however exploit this vulnerability as part of a phishing attack designed to steal user credentials. This vulnerability is fixed in 7.0.6, 6.3.10, 6.2.5, 6.1.8, and 6.0.5. Duende.IdentityServer 5.1 and earlier and all versions of IdentityServer4 are no longer supported and will not be receiving updates. If upgrading is not possible, use IUrlHelper.IsLocalUrl from ASP.NET Core to validate return Urls in user interface code in the IdentityServer host.

NVD

Affected Software

6 affected componentsFixes available
nuget/IdentityServer4<=4.1.2
nuget/Duende.IdentityServer>=6.0.0-preview.1<=6.0.4
6.0.5
nuget/Duende.IdentityServer>=6.1.0-preview.1<=6.1.7
6.1.8
nuget/Duende.IdentityServer>=6.2.0-preview.1<=6.2.4
6.2.5
nuget/Duende.IdentityServer>=6.3.0-preview.1<=6.3.9
6.3.10
nuget/Duende.IdentityServer>=7.0.0-preview.1<=7.0.5
7.0.6

Event History

Jul 31, 2024
Advisory Published
via GitHub·03:28 PM
CVE Published
via MITRE·03:44 PM
Data Sourced
via MITRE·03:44 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·04:15 PM
DescriptionSeverityWeakness
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the risk associated with CVE-2024-39694?

CVE-2024-39694 allows attackers to craft malicious URLs that can be wrongly treated as trusted, potentially redirecting users to untrusted sites.

2

How do I remediate CVE-2024-39694?

To fix CVE-2024-39694, upgrade to IdentityServer4 version 4.1.3 or higher, or Duende.IdentityServer versions specified in the advisory.

3

What versions of IdentityServer are affected by CVE-2024-39694?

CVE-2024-39694 affects IdentityServer4 versions up to 4.1.2 and specific versions of Duende.IdentityServer prior to the recommended upgrades.

4

Can CVE-2024-39694 lead to information disclosure?

While CVE-2024-39694 primarily opens a path for phishing attacks, it can indirectly lead to information disclosure if users are redirected to malicious sites.

5

Is CVE-2024-39694 a critical vulnerability?

CVE-2024-39694 is considered a high-severity vulnerability due to the risk of an attacker exploiting it to redirect users.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203