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, 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, 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.ParseAsyncandOidcReturnUrlParser.ParseAsyncmethods may incorrectly return non-null, and theReturnUrlParser.IsValidReturnUrlandOidcReturnUrlParser.IsValidReturnUrlmethods 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.
References
   
 
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, 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, 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.ParseAsyncandOidcReturnUrlParser.ParseAsyncmethods may incorrectly return non-null, and theReturnUrlParser.IsValidReturnUrlandOidcReturnUrlParser.IsValidReturnUrlmethods 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.
References