CVE-2026-28415: Gradio Gradio Has An Open Redirect Vulnerability
MODERATECVE-2026-28415 is a MODERATE (CVSS 4.3) gradio has an open redirect vulnerability (CWE-284: Improper Access Control) affecting Gradio libraries in the PyPI ecosystem. The issue involves gradio has an open redirect in its oauth flow. Remediation is available by upgrading affected packages to version 6.6.0.
CVE-2026-28415 at a Glance
Security Impact
CVSS: 4.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N).
How to Fix CVE-2026-28415
To remediate this vulnerability, upgrade all affected Gradio dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install gradio>=6.6.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show gradio
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-28415, inspect your installed packages using pip:
pip show gradio
Analyze the terminal output to locate any version of Gradio in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.6.0), your application is affected.
Note: The pip show gradio command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-284: Improper Access Control, where the product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. In Gradio, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-28415 Affected Gradio Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
gradio
|
PyPI |
< 6.6.0
|
6.6.0
|
References
Frequently Asked Questions
What is CVE-2026-28415?
Which Gradio versions are affected?
What version fixes CVE-2026-28415?
Is gradio affected?
What is the CVSS score of CVE-2026-28415?
What CWE is associated with CVE-2026-28415?
How can I check PyPI dependencies for CVE-2026-28415?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-pfjf-5gxr-995x",
"modified" : "2026-06-06T00:22:30Z",
"published" : "2026-03-01T01:29:12Z",
"aliases" : [ "CVE-2026-28415" ],
"summary" : "Gradio has an Open Redirect in its OAuth Flow",
"details" : "# 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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "gradio"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "6.6.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/gradio-app/gradio/security/advisories/GHSA-pfjf-5gxr-995x"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-28415"
}, {
"type" : "WEB",
"url" : "https://github.com/gradio-app/gradio/commit/dfee0da06d0aa94b3c2684131e7898d5d5c1911e"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/gradio-app/gradio"
}, {
"type" : "WEB",
"url" : "https://github.com/gradio-app/gradio/releases/tag/gradio%406.6.0"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/gradio/PYSEC-2026-65.yaml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-200", "CWE-284", "CWE-330", "CWE-601" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-01T01:29:12Z",
"nvd_published_at" : "2026-02-27T22:16:24Z"
}
}