CVE-2024-8021 — gradio
MEDIUMCVE-2024-8021 is a medium-severity (CVSS 5.4) Open Redirect vulnerability in gradio. The records list no fixed version yet; check the vendor advisory below and apply the mitigations in the meantime.
Gradio Vulnerable to Open Redirect
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
Exploitation and automatability from CISA’s SSVC triage for CVE-2024-8021.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
gradioReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
Description
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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | gradio | all versions | No fix |
Affected Products
gradiogradio_projectDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for gradio, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Remediation status
The records we use list no patched version of gradio for CVE-2024-8021. Check the maintainer's advisory, and where your build allows, override or pin the dependency away from the vulnerable range.
Mitigate without a patch
Stop reflecting attacker-controlled destinations: resolve every redirect target against an allowlist of paths or hosts you own, prefer a server-side key over a full URL in the request, and reject absolute URLs entirely where the flow only ever needs a relative one.
How to detect CVE-2024-8021
A community-maintained Nuclei template exists for this CVE. You can scan for it directly:
nuclei -id cve-2024-8021 -u https://target- Template
- Gradio - Open Redirect
- Severity
- medium
- Impact
- Attackers can craft malicious URLs with encoded redirects that send users to phishing sites or malicious domains, leading to credential theft and undermining trust in the Gradio application.
- Remediation
- Update Gradio to a version that addresses the open redirect vulnerability via URL encoding bypass.
Template by ProjectDiscovery nuclei-templates (DhiyaneshDK), MIT licensed. View the full template. Scan only systems you are authorised to test.
Frequently Asked Questions
Is CVE-2024-8021 in your dependencies?
Find it across PyPI, including transitive dependencies.