CVE-2024-8021: Gradio Vulnerable to Open Redirect
Gradio 4.37.2 and earlier has an open redirect. A crafted request with a URL-encoded target makes the app answer with a 302 redirect to an attacker-controlled site. An attacker can use a link on your Gradio host to send users to a phishing page. The advisory lists no patched version.
Published Mar 20, 2025 · Updated Mar 21, 2025 · Analysis Nov 1, 2026
What an attacker can do
The flaw is a URL redirection to an untrusted site (CWE-601). By URL-encoding the destination in a request, the attacker gets the Gradio server to return a 302 to a site of their choice. The advisory does not name the route that does this.
No account is needed, but the victim must click the link. The link carries your Gradio host name, so it looks trustworthy in an email or chat message. The attacker can then show a fake login page, steal credentials, or push a download. The advisory scores low confidentiality and integrity impact and no effect on availability.
The server itself is not compromised. The risk falls on the people who click, which makes it most relevant for Gradio apps that are public or sit behind a company domain.
Who is affected
gradio (pip) 4.37.2 and earlier. The advisory shows no fixed release. Check what you run:
pip show gradioAny Gradio app reachable by users over the network is exposed, whether hosted by you or on a shared domain.
gradio
- Ecosystem
- PyPI
- Affected
- <= 4.37.2
- Fixed in
- No patched version yet
- Check
pip show gradio
How to fix it
The advisory lists no patched version, and no workaround or fix commit is cited. Look at the Gradio release notes for a version after 4.37.2 and upgrade to the latest release.
In the meantime, you can have a reverse proxy in front of the app reject requests whose path or query holds encoded absolute URLs (for example %2F%2F followed by a host name). Test such a rule before use, because the sources do not describe the exact trigger.
How to tell if you were hit
Search access logs for requests that return a 302 and whose Location header points to a host other than your own. Look for percent-encoded URLs, such as http%3A%2F%2F or %2F%2F, in the request path or query. Cross-check with referrer data from phishing reports that mention your domain.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
An open redirect vulnerability exists in the latest version of gradio-app/gradio. The vulnerability allows an attacker to redirect users to a malicious website by URL encoding. This can be exploited by sending a crafted request to the application, which results in a 302 redirect to an attacker-controlled site.
Questions
- Is there a fixed version for CVE-2024-8021?
None is listed in the advisory. It reports 4.37.2 and earlier as affected. Check the Gradio release notes and upgrade to the newest version.
- Does the attack need a login?
No. The CVSS vector has no privileges required, but the victim has to open the crafted link, so user interaction is needed.
- What can an attacker do with an open redirect?
Send users from your trusted Gradio URL to a site they control, for phishing or malware delivery. It does not give them control of the Gradio server.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More Gradio vulnerabilities
All Gradio entriesCVE-2026-49119
Gradio FileExplorer preprocess path traversal allows files outside root_dir to reach callbacks
high7.5Jul 1, 2026CVE-2026-10783
Gradio: Audio cache key ignores metadata when saving numpy audio outputs
low2.5Jun 4, 2026CVE-2026-48545
Gradio contains a cookie injection vulnerability
high6.8May 27, 2026CVE-2026-27167
Gradio: Mocked OAuth Login Exposes Server Credentials and Uses Hardcoded Session Secret
lowMar 1, 2026CVE-2026-28414
Gradio is Vulnerable to Absolute Path Traversal on Windows with Python 3.13+
high7.5Mar 1, 2026CVE-2026-28415
Gradio has an Open Redirect in its OAuth Flow
medium4.3Mar 1, 2026
