CVE-2024-1728 Local File Inclusion in gradio-app/gradio
Attackers can read arbitrary files and potentially execute code via path traversal in the Gradio UploadButton component.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-1728?
CVE-2024-1728 is a high-severity path traversal vulnerability in Gradio Project Gradio, published on 10 Apr 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
gradio-app/gradio is vulnerable to a local file inclusion vulnerability due to improper validation of user-supplied input in the UploadButton component. Attackers can exploit this vulnerability to read arbitrary files on the filesystem, such as private SSH keys, by manipulating the file path in the request to the `/queue/join` endpoint. This issue could potentially lead to remote code execution. The vulnerability is present in the handling of file upload paths, allowing attackers to redirect file uploads to unintended locations on the server.
Weakness: CWE-22
Which versions are affected by CVE-2024-1728?
3 open source packages ship an affected version, including gradio. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
gradio PyPI | All versions | 4.19.2 |
gradio PyPI | All versions | 4.19.2 |
gradio PyPI | All versions | 4.19.2 |
Products include Gradio Project Gradio.
How do I fix CVE-2024-1728?
Upgrade gradio to 4.19.2 or later.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2024-1728 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-1728 exists.
Public exploit code: 1 Nuclei template.
Other vulnerabilities in Gradio Project Gradio
- CVE-2024-39236 Withdrawn Advisory: Gradio was discovered to contain a code injection vulnerability via the component /gradio/component_meta.py
- CVE-2023-6572 Command Injection in gradio-app/gradio
- CVE-2022-24770 Improper Neutralization of Formula Elements in a CSV File in Gradio Flagging
- CVE-2026-49119 Gradio < 6.16.0 Path Traversal via FileExplorer.preprocess()
- CVE-2025-23042 Gradio Blocked Path ACL Bypass Vulnerability
Sources
Also known as GHSA-m842-4qm8-7gpq, PYSEC-2026-345.