CVE-2024-47868: Several components’ post-process steps may allow arbitrary file leaks in Gradio
Impact What kind of vulnerability is it? Who is impacted?
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.
Patches Yes, the issue has been resolved in gradio>5.0. Upgrading to the latest version will mitigate this vulnerability.
Other sources
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.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
pip/gradioto a version that resolves this vulnerability.Fixed in 5.0.0 - Upgrade
Upgrade
gradioto a version that resolves this vulnerability.Fixed in 5.0
Event History
Frequently Asked Questions
What is the severity of CVE-2024-47868?
The severity of CVE-2024-47868 is categorized as a data validation vulnerability that can lead to arbitrary file leaks.
How do I fix CVE-2024-47868?
To remediate CVE-2024-47868, you should upgrade Gradio to version 5.0.0 or later.
Who is impacted by CVE-2024-47868?
CVE-2024-47868 impacts users of Gradio versions prior to 5.0.0.
What components are affected by CVE-2024-47868?
CVE-2024-47868 affects several components of the Gradio framework related to data handling.
How can attackers exploit CVE-2024-47868?
Attackers can exploit CVE-2024-47868 by crafting requests that bypass data validation in Gradio's post-processing step.