Gradio has an Open Redirect in its OAuth Flow
Summary
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).
Details
def _redirect_to_target(request, default_target="/"):
target = request.query_params.get("_target_url", default_target)
return RedirectResponse(target) # No validation
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.
Impact
Phishing — an attacker can use the trusted domain to redirect users to a malicious site. No direct data exposure or server-side impact.
Fix
The _target_url parameter is now sanitized to only use the path, query, and fragment, stripping any scheme or host.
Czego dotyczy
Kliknij technologię, aby zobaczyć wszystkie dotyczące jej podatności.
| Platforma | Paczka | Podatne wersje | Poprawka w wersji |
|---|---|---|---|
| Python (PyPI) | gradio | < 6.6.0 | 6.6.0 |
Odnośniki
- https://github.com/gradio-app/gradio/security/advisories/GHSA-pfjf-5gxr-995x
- https://nvd.nist.gov/vuln/detail/CVE-2026-28415
- https://github.com/gradio-app/gradio/commit/dfee0da06d0aa94b3c2684131e7898d5d5c1911e
- https://github.com/gradio-app/gradio
- https://github.com/gradio-app/gradio/releases/tag/gradio%406.6.0
- https://github.com/pypa/advisory-database/tree/main/vulns/gradio/PYSEC-2026-65.yaml
- Wektor CVSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N- Słabość (CWE)
CWE-200, CWE-284, CWE-330, CWE-601- Platforma
- Python (PyPI)
- Paczka
gradio- Ujawniono
- 27.02.2026
- Aktualizacja
- 11.10.2026 12:19
Źródła i licencje
OSV / GitHub Advisory Database - PYSEC-2026-65 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-pfjf-5gxr-995x - CC BY 4.0
Historia podatności: gradio
Wszystkie opisane podatności tej paczki (Python (PyPI)), od najnowszej. Widać, czy to jednorazowa wpadka, czy paczka, której trzeba pilnować.
- Wszystkich wpisów
- 51
- Pierwsza → ostatnia
- 12.2021 07.2026
- Bez poprawki
- 13
- Wykorzystywana w atakach
- 0
Rozkład istotności
- Krytyczna 5
- Wysoka 19
- Średnia 22
- Niska 5
Ujawnienia w latach
- 2021: 1
- 2022: 1
- 2023: 5
- 2024: 28
- 2025: 9
- 2026: 7
-
Gradio has an Open Redirect in its OAuth Flow ten wpis
Dowiedz się, które podatności dotyczą Twojej aplikacji
Po podłączeniu integracji DockRay i włączeniu raportowania oprogramowania DockRay porównuje zgłoszone wersje komponentów ze znanymi podatnościami i powiadamia o potwierdzonych dopasowaniach. Zakres zależy od obsługiwanej technologii i dostępnych biuletynów.