GHSA-55p7-v223-x366 IdentityServer Open Redirect vulnerability

Not scored Published

Attackers can craft malicious URLs that IdentityServer incorrectly treats as trusted, redirecting users to untrusted third-party sites.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
None listed

What is GHSA-55p7-v223-x366?

GHSA-55p7-v223-x366 is a vulnerability in IdentityServer4, published on 31 Jul 2024. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

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.

Which versions are affected by GHSA-55p7-v223-x366?

2 open source packages ship an affected version, including IdentityServer4.

PackageAffectedFixed in
IdentityServer4 NuGetAll versions to 4.1.2None
IdentityServer4 NuGetAll versions to 4.1.2None

How do I fix GHSA-55p7-v223-x366?

No fix has been published for GHSA-55p7-v223-x366 yet. Limit exposure of the affected software until one is available.

Is GHSA-55p7-v223-x366 being exploited?

There is no known exploitation of GHSA-55p7-v223-x366 in the wild and no public exploit code.

Sources

Is GHSA-55p7-v223-x366 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free