CVE-2024-1728 Local File Inclusion in gradio-app/gradio

High 7.5 Published Updated

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.

PackageAffectedFixed in
gradio PyPIAll versions4.19.2
gradio PyPIAll versions4.19.2
gradio PyPIAll versions4.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.

All Gradio Project Gradio vulnerabilities

Sources

Also known as GHSA-m842-4qm8-7gpq, PYSEC-2026-345.

Is CVE-2024-1728 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free