CVE-2026-28415: Gradio has Open Redirect in OAuth Flow

Published Feb 27, 2026
·
Updated

Summary

The redirecttotarget() function in Gradio's OAuth flow accepts an unvalidated targeturl 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 redirecttotarget(request, defaulttarget="/"): target = request.queryparams.get("targeturl", defaulttarget) return RedirectResponse(target) # No validation An attacker can craft a URL like https://my-space.hf.space/logout?targeturl=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 targeturl parameter is now sanitized to only use the path, query, and fragment, stripping any scheme or host.

Other sources

Gradio is an open-source Python package designed for quick prototyping. Prior to version 6.6.0, the redirecttotarget() function in Gradio's OAuth flow accepts an unvalidated targeturl 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 targeturl parameter is sanitized to only use the path, query, and fragment, stripping any scheme or host.

— MITRE

Affected Software

3 affected componentsFixes available
pypi/gradio<6.6.0
pip/gradio<6.6.0
6.6.0
Gradio Project Gradio Python<6.6.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/gradio to a version that resolves this vulnerability.

    Fixed in 6.6.0
  2. Upgrade

    Upgrade Gradio to a version that resolves this vulnerability.

    Fixed in 6.6.0

Event History

Feb 27, 2026
CVE Published
via MITRE·09:44 PM
Data Sourced
via MITRE·09:44 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·10:16 PM
DescriptionSeverityWeaknessAffected Software
Mar 1, 2026
Advisory Published
via GitHub·01:29 AM
Data Sourced
via GitHub·01:29 AM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-28415?

CVE-2026-28415 is classified as a high severity vulnerability due to the potential for arbitrary redirection to unsafe external websites.

2

How do I fix CVE-2026-28415?

To mitigate CVE-2026-28415, update Gradio to version 6.6.0 or later, which includes a fix for the unvalidated redirect issue.

3

What are the risks associated with CVE-2026-28415?

The risks of CVE-2026-28415 include phishing attacks and exposure to malicious sites as a result of the open redirect vulnerability in the OAuth flow.

4

Which versions of Gradio are affected by CVE-2026-28415?

CVE-2026-28415 affects Gradio versions prior to 6.6.0.

5

What components of Gradio are impacted by CVE-2026-28415?

The vulnerability specifically impacts the _redirect_to_target() function in Gradio's OAuth flow.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203