Medium

IdentityServer Open Redirect vulnerability

  • Disclosed: 31.07.2024
  • Updated: 11.10.2026 11:23

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.

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, and Consent 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

IdentityServer4 is no longer supported and will not be receiving updates. Please consider updating to Duende.IdentityServer.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
.NET (NuGet) IdentityServer4 <= 4.1.2 no fix

References

CVSS score 4.7/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N
Weakness (CWE)
CWE-601
Platform
.NET (NuGet)
Package
IdentityServer4
Disclosed
31.07.2024
Updated
11.10.2026 11:23

Sources and licenses

OSV / GitHub Advisory Database - GHSA-55p7-v223-x366 - CC BY 4.0

Vulnerability history: IdentityServer4

All published vulnerabilities of this package (.NET (NuGet)), newest first. Shows whether this is a one-off slip or a package that needs watching.

Total entries
2
First → latest
07.2024 07.2024
Without a fix
2
Exploited in attacks
0

Severity breakdown

  • Medium 2

Disclosures per year

  1. 2024: 2
  2. 2025: 0
  3. 2026: 0
  1. IdentityServer Open Redirect vulnerability this entry
    Medium · 4.7 ghsa-55p7-v223-x366 <= 4.1.2 no fix
  2. Medium · 4.7 CVE-2024-39694 <= 4.1.2 no fix

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.