URL Redirection to Untrusted Site ('Open Redirect') Affecting identityserver4 package, versions [0,]


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    EPSS
    0.04% (12th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-DOTNET-IDENTITYSERVER4-7577153
  • published 1 Aug 2024
  • disclosed 31 Jul 2024
  • credit Unknown

How to fix?

There is no fixed version for IdentityServer4.

Overview

IdentityServer4 is an OpenID Connect and OAuth 2.0 Framework for ASP.NET Core

Affected versions of this package are vulnerable to URL Redirection to Untrusted Site ('Open Redirect') through the commonly used GetAuthorizationContextAsync and IsValidReturnUrl methods which return non-null values and the IsValidReturnUrl method which could return true for malicious URLs. In addition, this could be exploited through the uncommonly used ServerUrlExtensions.GetIdentityServerRelativeUrl, ReturnUrlParser.ParseAsync and OidcReturnUrlParser.ParseAsync methods that could incorrectly return non-null, and the ReturnUrlParser.IsValidReturnUrl and OidcReturnUrlParser.IsValidReturnUrl methods that could incorrectly return true for malicious URLs.

Workaround

Users who are unable to upgrade to the fixed version can use IUrlHelper.IsLocalUrl from ASP.NET Core 5.0 or later to validate return Urls in user interface code in the IdentityServer host.

CVSS Scores

version 4.0
version 3.1
Expand this section

Snyk

Recommended
5.3 medium
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    Low
  • Attack Requirements (AT)
    None
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    Passive
  • Confidentiality (VC)
    Low
  • Integrity (VI)
    None
  • Availability (VA)
    None
  • Confidentiality (SC)
    Low
  • Integrity (SI)
    None
  • Availability (SA)
    None