4.7medium
Duende IdentityServer Open Redirect vulnerability
- Severity
- 4.7medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.53% (higher than 46% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-ff4q-64jc-gx98
Description
Duende IdentityServer is an OpenID Connect and OAuth 2.x framework for ASP.NET Core. 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. This vulnerability is fixed in 7.0.6, 6.3.10, 6.2.5, 6.1.8, and 6.0.5. Duende.IdentityServer 5.1 and earlier and all versions of IdentityServer4 are no longer supported and will not be receiving updates. If upgrading is not possible, use `IUrlHelper.IsLocalUrl` from ASP.NET Core to validate return Urls in user interface code in the IdentityServer host.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| DuendeSoftware IdentityServer | < 6.0.5, >= 6.1.0-preview.1, <= 6.1.7, >= 6.2.0-preview.1, <= 6.2.4, >= 6.3.0-preview.1, <= 6.3.9, >= 7.0.0-preview.1, <= 7.0.5 | CVE List |
| Duende.IdentityServer (NuGet) | from 7.0.0-preview.1 before 7.0.6, from 6.3.0-preview.1 before 6.3.10, from 6.2.0-preview.1 before 6.2.5, from 6.1.0-preview.1 before 6.1.8, from 6.0.0-preview.1 before 6.0.5 | GitHub Advisory Database |
| IdentityServer4 (NuGet) | up to 4.1.2 | GitHub Advisory Database |
All scores
| GitHub_M | 4.7medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N |
| GitHub | 4.7medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:N/VA:N/SC:L/SI:N/SA:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
Duende IdentityServer is an OpenID Connect and OAuth 2.x framework for ASP.NET Core. 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. This vulnerability is fixed in 7.0.6, 6.3.10, 6.2.5, 6.1.8, and 6.0.5. Duende.IdentityServer 5.1 and earlier and all versions of IdentityServer4 are no longer supported and will not be receiving updates. If upgrading is not possible, use `IUrlHelper.IsLocalUrl` from ASP.NET Core to validate return Urls in user interface code in the IdentityServer host.
GitHub Advisory Database
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.
NVD (es)
Duende IdentityServer es un framework OpenID Connect y OAuth 2.x para ASP.NET Core. Es posible que un atacante cree URL maliciosas que ciertas funciones de IdentityServer traten incorrectamente como locales y confiables. Si dicha URL se devuelve como redireccionamiento, algunos navegadores la seguirán hasta un sitio de terceros que no es de confianza. Nota: por sí sola, esta vulnerabilidad **no** permite que un atacante obtenga credenciales de usuario, códigos de autorización, tokens de acceso, tokens de actualización o tokens de identidad. Sin embargo, un atacante podría aprovechar esta vulnerabilidad como parte de un ataque de phishing diseñado para robar las credenciales de los usuarios. Esta vulnerabilidad se solucionó en 7.0.6, 6.3.10, 6.2.5, 6.1.8 y 6.0.5. Duende.IdentityServer 5.1 y anteriores y todas las versiones de IdentityServer4 ya no son compatibles y no recibirán actualizaciones. Si no es posible realizar la actualización, use `IUrlHelper.IsLocalUrl` de ASP.NET Core para validar las URL de retorno en el código de la interfaz de usuario en el host IdentityServer.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-39694 changed 2024-07-31 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-ff4q-64jc-gx98 changed 2024-07-31 | CC-BY-4.0 |
| NVD | CVE-2024-39694 changed 2026-06-17 | Public domain |