INCIDENT MAP

Browse / AI Framework and Platform Flaws / CVE-2026-28415

Gradio has an Open Redirect in its OAuth Flow

CVE-2026-28415 · 2026-03-01 moderate

Class
AI Framework and Platform Flaws (filed by a model that read the advisory)
Technique
Other weaknesses
Affected
gradio (PyPI)
CVSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
EPSS
0.3% chance of exploitation in 30 days

How it works, in short

Logout and login callback endpoints redirect to an unvalidated target URL, letting attackers send users from a trusted domain to external sites. (Our summary, written by a model. The source text is below.)

Details

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.

References

Source: GitHub Advisory Database, used under CC BY 4.0.