AI and data stack advisories

Severe, 6 weeks1496Projects326

1496 severe, 6 weeks · 326 projects

GradioGHSA-pfjf-5gxr-995x

Gradio has an Open Redirect in its OAuth Flow

Gradio

CVE-2026-28415 · Published Mar 1, 2026 · updated Jun 6, 2026

Medium4.3
Fix: upgrade to 6.6.0 or later
GitHub advisory

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

```python

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.

Affected versions

PackageAffectedFixed in
gradio
PyPI
< 6.6.06.6.0
Details and references

More Gradio advisories

All Gradio