{"id":"CVE-2024-39694","aliases":["CVE-2024-39694","GHSA-ff4q-64jc-gx98"],"related":[],"kind":"vulnerability","state":"published","title":"Duende IdentityServer Open Redirect vulnerability","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\nIt 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.\n\n_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._\n\n### Affected Methods\n- 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.\n\n   _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:_\n\n- 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.\n\n### Patches\nThis vulnerability is fixed in the following versions of Duende.IdentityServer:\n- 7.0.6\n- 6.3.10\n- 6.2.5\n- 6.1.8\n- 6.0.5\n\nDuende.IdentityServer 5.1 and earlier and all versions of IdentityServer4 are no longer supported and will not be receiving updates. \n\n### Workarounds\n\nIf 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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2024-07-31T15:28:54.000Z","modified":"2026-06-17T07:42:29.117Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N","score":4.7,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N","score":4.7,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N","score":4.7,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"MEDIUM"}],"cwes":["CWE-601"],"affected":[{"ranges":[{"version":"< 6.0.5","status":"affected"},{"version":">= 6.1.0-preview.1, <= 6.1.7","status":"affected"},{"version":">= 6.2.0-preview.1, <= 6.2.4","status":"affected"},{"version":">= 6.3.0-preview.1, <= 6.3.9","status":"affected"},{"version":">= 7.0.0-preview.1, <= 7.0.5","status":"affected"}],"vendor":"DuendeSoftware","product":"IdentityServer","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"7.0.0-preview.1","status":"affected","fixed":"7.0.6"}],"ecosystem":"NuGet","package":"Duende.IdentityServer","purl":"pkg:nuget/Duende.IdentityServer","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"6.3.0-preview.1","status":"affected","fixed":"6.3.10"}],"ecosystem":"NuGet","package":"Duende.IdentityServer","purl":"pkg:nuget/Duende.IdentityServer","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"6.2.0-preview.1","status":"affected","fixed":"6.2.5"}],"ecosystem":"NuGet","package":"Duende.IdentityServer","purl":"pkg:nuget/Duende.IdentityServer","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"6.1.0-preview.1","status":"affected","fixed":"6.1.8"}],"ecosystem":"NuGet","package":"Duende.IdentityServer","purl":"pkg:nuget/Duende.IdentityServer","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"6.0.0-preview.1","status":"affected","fixed":"6.0.5"}],"ecosystem":"NuGet","package":"Duende.IdentityServer","purl":"pkg:nuget/Duende.IdentityServer","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","lastAffected":"4.1.2"}],"ecosystem":"NuGet","package":"IdentityServer4","purl":"pkg:nuget/IdentityServer4","source":"ghsa"}],"references":[{"url":"https://github.com/DuendeSoftware/IdentityServer/security/advisories/GHSA-ff4q-64jc-gx98","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/DuendeSoftware/IdentityServer/commit/269ca2171fe1e901c87f2f0797bbc7c230db87c6","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/DuendeSoftware/IdentityServer/commit/765116a2d4fb0671b6eba015e698533900c61c8e","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/DuendeSoftware/IdentityServer/commit/d0d8eab35ad9183b14925496803ed8b36658d0a1","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/DuendeSoftware/IdentityServer/commit/f04cf0be859b93f43563f8f812eb92206ad94011","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/DuendeSoftware/IdentityServer/commit/fe817b499933d6ed6141b153492d7335c28b184a","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/IdentityServer/IdentityServer4/security/advisories/GHSA-55p7-v223-x366","tags":["web"],"sources":["ghsa"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-39694","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/DuendeSoftware/IdentityServer","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-07-31T16:51:39.130Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-39694","url":"https://www.cve.org/CVERecord?id=CVE-2024-39694","licence":"CVE Terms of Use","modified":"2024-07-31T16:51:46.950Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-ff4q-64jc-gx98","url":"https://github.com/advisories/GHSA-ff4q-64jc-gx98","licence":"CC-BY-4.0","modified":"2024-07-31T20:13:36.853Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-39694","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-39694","licence":"Public domain","modified":"2026-06-17T07:42:29.117Z"}],"updatedAt":"2026-11-25T22:58:43.478Z","epss":{"score":0.00534,"percentile":0.46515,"date":"2026-12-01T12:00:22.000Z"}}