Loading...
Skip to main content

CVE-2024-39694 — Vulnerability in Duende.IdentityServer — CVE Details

MEDIUM

IdentityServer Open Redirect vulnerability

Published July 31, 2024Updated July 31, 2024Source: osv

Summary

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

Advisory Timeline

  • First published July 31, 2024 (803 days ago).
  • Last revised July 31, 2024 — 0 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

NuGet
Update Duende.IdentityServer to 6.0.5 or later
dotnet add package Duende.IdentityServer --version 6.0.5
NuGet
Update Duende.IdentityServer to 6.1.8 or later
dotnet add package Duende.IdentityServer --version 6.1.8
NuGet
Update Duende.IdentityServer to 6.3.10 or later
dotnet add package Duende.IdentityServer --version 6.3.10
NuGet
Update Duende.IdentityServer to 7.0.6 or later
dotnet add package Duende.IdentityServer --version 7.0.6
NuGet
Update Duende.IdentityServer to 6.2.5 or later
dotnet add package Duende.IdentityServer --version 6.2.5

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (6)

Affects 1 ecosystem: nuget (2).

PackageEcosystemAffectedFixed In
Duende.IdentityServer
nuget
6.0.0, 6.0.1, 6.0.2, 6.0.3 (+1 more)6.0.5
Duende.IdentityServer
nuget
6.1.0, 6.1.1, 6.1.2, 6.1.3 (+4 more)6.1.8
Duende.IdentityServer
nuget
6.3.0, 6.3.1, 6.3.2, 6.3.3 (+6 more)6.3.10
IdentityServer4
nuget
1.0.0, 1.0.0-beta1, 1.0.0-beta1-update1, 1.0.0-beta2 (+77 more)Range-based data available
Duende.IdentityServer
nuget
7.0.0, 7.0.1, 7.0.2, 7.0.3 (+2 more)7.0.6
Duende.IdentityServer
nuget
6.2.0, 6.2.1, 6.2.2, 6.2.3 (+1 more)6.2.5

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 4.7 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
None
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N

Frequently Asked Questions

What is CVE-2024-39694?
IdentityServer Open Redirect vulnerability This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 4.7/10).
How do I check if my project is affected by CVE-2024-39694?
CVE-2024-39694 affects Duende.IdentityServer and IdentityServer4. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2024-39694 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
4.7

Exploitation requires specific conditions or has limited impact. Remediate within weeks.

Also Known As

GHSA-ff4q-64jc-gx98

Related CVEs

  • CVE-2026-106111
    MEDIUM

    ImageSharp: EXR ZIP decoder can expose stale allocator data after a short inflate

  • CVE-2026-65829
    MEDIUM

    MPXJ: Potential Path Traversal Vulnerability in Primavera P3 PRX and SureTrak STX readers

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies