CVE-2024-39694 — Vulnerability in IdentityServer4 — CVE Details
IdentityServer Open Redirect vulnerability
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.82%). Schedule for your next planned update.
Does your project use an affected IdentityServer4 version?
Paste your packages.lock.json to check it for CVE-2024-39694 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
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, theGetAuthorizationContextAsyncmethod may return non-null and theIsValidReturnUrlmethod 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.ParseAsyncandOidcReturnUrlParser.ParseAsyncmethods may incorrectly return non-null, and theReturnUrlParser.IsValidReturnUrlandOidcReturnUrlParser.IsValidReturnUrlmethods 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 (848 days ago).
- Last revised July 31, 2024 — 0 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
dotnet add package Duende.IdentityServer --version 6.0.5
dotnet add package Duende.IdentityServer --version 6.3.10
dotnet add package Duende.IdentityServer --version 6.2.5
dotnet add package Duende.IdentityServer --version 6.1.8
dotnet add package Duende.IdentityServer --version 7.0.6
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (6)
Affects 1 ecosystem: NuGet (2).
| Package | Fixed In |
|---|---|
| IdentityServer4 NuGet · Affected: 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 · Affected: 6.0.0, 6.0.1, 6.0.2, 6.0.3 (+1 more) | 6.0.5 |
| Duende.IdentityServer NuGet · Affected: 6.3.0, 6.3.1, 6.3.2, 6.3.3 (+6 more) | 6.3.10 |
| Duende.IdentityServer NuGet · Affected: 6.2.0, 6.2.1, 6.2.2, 6.2.3 (+1 more) | 6.2.5 |
| Duende.IdentityServer NuGet · Affected: 6.1.0, 6.1.1, 6.1.2, 6.1.3 (+4 more) | 6.1.8 |
| Duende.IdentityServer NuGet · Affected: 7.0.0, 7.0.1, 7.0.2, 7.0.3 (+2 more) | 7.0.6 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-601Open RedirectMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 4.7 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N
References
- https://github.com/DuendeSoftware/IdentityServer/security/advisories/GHSA-ff4q-64jc-gx98WEB
- https://github.com/IdentityServer/IdentityServer4/security/advisories/GHSA-55p7-v223-x366WEB
- https://nvd.nist.gov/vuln/detail/CVE-2024-39694ADVISORY
- https://github.com/DuendeSoftware/IdentityServer/commit/269ca2171fe1e901c87f2f0797bbc7c230db87c6WEB
- https://github.com/DuendeSoftware/IdentityServer/commit/765116a2d4fb0671b6eba015e698533900c61c8eWEB
- https://github.com/DuendeSoftware/IdentityServer/commit/d0d8eab35ad9183b14925496803ed8b36658d0a1WEB
- https://github.com/DuendeSoftware/IdentityServer/commit/f04cf0be859b93f43563f8f812eb92206ad94011WEB
- https://github.com/DuendeSoftware/IdentityServer/commit/fe817b499933d6ed6141b153492d7335c28b184aWEB
- https://github.com/DuendeSoftware/IdentityServerPACKAGE
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 IdentityServer4 and Duende.IdentityServer. It has a 0.8% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2024-39694 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Exploitation requires specific conditions, or the impact is limited.
This is an above-median EPSS score — 54.4% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.
Also Known As
Related CVEs
- CVE-2026-114154MEDIUM
Microsoft Security Advisory CVE-2026-114154 - ASP.NET Core Denial of Service Vulnerability
- GHSA-6856-87hx-p5x7MEDIUM
Microsoft Security Advisory CVE-2026-105544 - .NET Elevation of Privilege Vulnerability