Skip to content
GradioGHSA-4q3c-cj7g-jcwf

Gradio has several components with post-process steps allow arbitrary file leaks

Medium5.3CVE-2024-47868 · Published Oct 10, 2024 · updated Jan 21, 2025

GitHub advisory

Affected versions

PackageAffectedFixed in
gradio
PyPI
< 5.0.05.0.0
Details and references

### 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.

CVSS 3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
Severity from
GitHub (reviewed advisory)
Weakness
CWE-200, CWE-22
Also known as
CVE-2024-47868, PYSEC-2024-217

More Gradio advisories

All Gradio
DateAdvisory
Oct 102024Gradios's CORS origin validation is not performed when the request has a cookie
CVE-2024-47084High8.8fixed in 4.44.0
Oct 102024Gradio's `is_in_or_equal` function may be bypassed
CVE-2024-47164Medium6.5fixed in 5.0.0
Oct 102024Gradio's CORS origin validation accepts the null origin
CVE-2024-47165Medium5.4fixed in 5.0.0
Oct 102024Gradio has a one-level read path traversal in `/custom_component`
CVE-2024-47166Medium5.3fixed in 4.44.0
Oct 102024Gradio vulnerable to SSRF in the path parameter of /queue/join
CVE-2024-47167Medium7.2fixed in 5.0.0
Oct 102024In Gradio, the `enable_monitoring` flag set to `False` does not disable monitoring
CVE-2024-47168Low4.3fixed in 4.44.0

Critical advisories by email

Wednesdays: the week’s critical and high advisories in the AI and data stack, with the fixed versions. Only in weeks that have some.

Double opt-in. Unsubscribe any time.