{"id":"CVE-2026-28415","aliases":["CVE-2026-28415","GHSA-pfjf-5gxr-995x","PYSEC-2026-65"],"related":[],"kind":"vulnerability","state":"published","title":"Gradio has Open Redirect in OAuth Flow","summary":"Gradio is an open-source Python package designed for quick prototyping. Prior to version 6.6.0, the _redirect_to_target() function in Gradio's OAuth flow accepts an unvalidated _target_url query parameter, allowing redirection to arbitrary external URLs. This affects the /logout and /login/callback endpoints on Gradio apps with OAuth enabled (i.e. apps running on Hugging Face Spaces with gr.LoginButton). Starting in version 6.6.0, the _target_url parameter is sanitized to only use the path, query, and fragment, stripping any scheme or host.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Gradio is an open-source Python package designed for quick prototyping. Prior to version 6.6.0, the _redirect_to_target() function in Gradio's OAuth flow accepts an unvalidated _target_url query parameter, allowing redirection to arbitrary external URLs. This affects the /logout and /login/callback endpoints on Gradio apps with OAuth enabled (i.e. apps running on Hugging Face Spaces with gr.LoginButton). Starting in version 6.6.0, the _target_url parameter is sanitized to only use the path, query, and fragment, stripping any scheme or host.","source":"cvelist"},{"lang":"en","text":"# Summary\n\nThe _redirect_to_target() function in Gradio's OAuth flow accepts an unvalidated _target_url query parameter, allowing redirection to arbitrary external URLs. This affects the /logout and /login/callback endpoints on Gradio apps with OAuth enabled (i.e. apps running on Hugging Face Spaces with gr.LoginButton).\n\n## Details\n\n```python\n\n  def _redirect_to_target(request, default_target=\"/\"):\n      target = request.query_params.get(\"_target_url\", default_target)\n      return RedirectResponse(target)  # No validation\n```\n  An attacker can craft a URL like https://my-space.hf.space/logout?_target_url=https://evil.com/phishing that redirects the user to an external site after logout. Because the URL originates from a trusted hf.space domain, users are more likely to trust the link.\n\n## Impact\n\nPhishing — an attacker can use the trusted domain to redirect users to a malicious site. No direct data exposure or server-side impact.\n\n ## Fix\nThe _target_url parameter is now sanitized to only use the path, query, and fragment, stripping any scheme or host.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Gradio es un paquete Python de código abierto diseñado para la creación rápida de prototipos. Antes de la versión 6.6.0, la función _redirect_to_target() en el flujo OAuth de Gradio acepta un parámetro de consulta _target_url no validado, lo que permite la redirección a URL externas arbitrarias. Esto afecta a los endpoints /logout y /login/callback en aplicaciones Gradio con OAuth habilitado (es decir, aplicaciones que se ejecutan en Hugging Face Spaces con gr.LoginButton). A partir de la versión 6.6.0, el parámetro _target_url se sanea para usar solo la ruta, la consulta y el fragmento, eliminando cualquier esquema o host.","source":"nvd"}],"published":"2026-02-27T21:44:51.956Z","modified":"2026-06-17T10:28:34.843Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","score":4.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","score":4.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","score":4.3,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:N","score":4.7,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:N","score":4.7,"rating":"MEDIUM"}],"cwes":["CWE-200","CWE-284","CWE-330","CWE-601"],"affected":[{"ranges":[{"version":"< 6.6.0","status":"affected"}],"vendor":"gradio-app","product":"gradio","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"6.6.0"}],"ecosystem":"PyPI","package":"gradio","purl":"pkg:pypi/gradio","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"6.6.0"}],"vendor":"gradio_project","product":"gradio","cpe":"cpe:2.3:a:gradio_project:gradio:*:*:*:*:*:python:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"6.6.0"}],"ecosystem":"PyPI","package":"gradio","purl":"pkg:pypi/gradio","source":"pysec"}],"references":[{"url":"https://github.com/gradio-app/gradio/security/advisories/GHSA-pfjf-5gxr-995x","tags":["advisory","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-28415","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/gradio-app/gradio/commit/dfee0da06d0aa94b3c2684131e7898d5d5c1911e","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/gradio-app/gradio","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/gradio-app/gradio/releases/tag/gradio%406.6.0","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/gradio/PYSEC-2026-65.yaml","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-03-02T21:55:30.572Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-28415","url":"https://www.cve.org/CVERecord?id=CVE-2026-28415","licence":"CVE Terms of Use","modified":"2026-03-02T21:55:38.664Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-pfjf-5gxr-995x","url":"https://github.com/advisories/GHSA-pfjf-5gxr-995x","licence":"CC-BY-4.0","modified":"2026-06-06T00:30:08.769Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-28415","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-28415","licence":"Public domain","modified":"2026-06-17T10:28:34.843Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-65","url":"https://osv.dev/vulnerability/PYSEC-2026-65","licence":"CC-BY-4.0","modified":"2026-05-20T09:19:02.144Z"}],"updatedAt":"2026-11-25T22:59:15.052Z","epss":{"score":0.00284,"percentile":0.22478,"date":"2026-12-01T12:00:22.000Z"}}