Several components’ post-process steps may allow arbitrary file leaks in Gradio
Description
Gradio is an open-source Python package designed for quick prototyping. This is a data validation vulnerability affecting several Gradio components, which allows arbitrary file leaks through the post-processing step. Attackers can exploit these components by crafting requests that bypass expected input constraints. This issue could lead to sensitive files being exposed to unauthorized users, especially when combined with other vulnerabilities, such as issue TOB-GRADIO-15. The components most at risk are those that return or handle file data. Vulnerable Components: 1. String to FileData: DownloadButton, Audio, ImageEditor, Video, Model3D, File, UploadButton. 2. Complex data to FileData: Chatbot, MultimodalTextbox. 3. Direct file read in preprocess: Code. 4. Dictionary converted to FileData: ParamViewer, Dataset. Exploit Scenarios: 1. A developer creates a Dropdown list that passes values to a DownloadButton. An attacker bypasses the allowed inputs, sends an arbitrary file path (like /etc/passwd), and downloads sensitive files. 2. An attacker crafts a malicious payload in a ParamViewer component, leaking sensitive files from a server through the arbitrary file leak. This issue has been resolved in gradio>5.0. Upgrading to the latest version will mitigate this vulnerability. There are no known workarounds for this vulnerability.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Gradio components fail to validate file path inputs, allowing attackers to leak arbitrary files from the server.
Vulnerability
Analysis
CVE-2024-47868 is a data validation vulnerability in the open-source Python package Gradio, which is used for rapidly prototyping machine learning applications. The vulnerability stems from a lack of proper input validation during the post-processing step of several components that handle file data [1][4]. Specifically, these components convert user-supplied strings, complex data, or dictionary values into FileData objects without verifying that the supplied file path is within an allowed set. This allows an attacker to bypass expected constraints, such as values from a Dropdown list, and provide an arbitrary file path like /etc/passwd [1][4].
Exploitation
Exploitation is straightforward and does not require authentication if the application is publicly accessible. An attacker can craft a request to a vulnerable component—such as DownloadButton, ImageEditor, File, ParamViewer, or Dataset—and include a path to a sensitive file on the server [1][4]. The component then processes this path and returns the file contents to the attacker. The advisory explicitly outlines two exploit scenarios: manipulating a DownloadButton that receives its value from a Dropdown list, and crafting a malicious payload in a ParamViewer component [1][4].
Impact
The impact is the unauthorized disclosure of sensitive files from the server's filesystem. An attacker could leak configuration files, source code, credentials, or other data, potentially leading to further compromise of the application or its environment [1]. The vulnerability is amplified when combined with other issues, such as TOB-GRADIO-15 [1].
Mitigation
The issue has been patched in gradio>5.0. Users are strongly advised to upgrade to the latest version of the package [1][4]. As of the advisory, there are no known workarounds for this vulnerability [1][4].
AI Insight generated on May 20, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
gradioPyPI | < 5.0.0 | 5.0.0 |
Affected products
2- gradio-app/gradiov5Range: < 5.0
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
4- github.com/advisories/GHSA-4q3c-cj7g-jcwfghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2024-47868ghsaADVISORY
- github.com/gradio-app/gradio/security/advisories/GHSA-4q3c-cj7g-jcwfghsax_refsource_CONFIRMWEB
- github.com/pypa/advisory-database/tree/main/vulns/gradio/PYSEC-2024-217.yamlghsaWEB
News mentions
0No linked articles in our index yet.