CVE-2024-51751
published 2024-11-06CVE-2024-51751: Gradio is an open-source Python package designed to enable quick builds of a demo or web application. If File or UploadButton components are used as a part of…
PriorityP340medium6.5CVSS 3.1
AVNACLPRLUINSUCHINAN
EPSS
0.67%
47.4th percentile
Gradio is an open-source Python package designed to enable quick builds of a demo or web application. If File or UploadButton components are used as a part of Gradio application to preview file content, an attacker with access to the application might abuse these components to read arbitrary files from the application server. This issue has been addressed in release version 5.5.0 and all users are advised to upgrade. There are no known workarounds for this vulnerability.
Affected
3 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| gradio-app | gradio | — | — |
| gradio_project | gradio | >= 5.0.0 < 5.5.0 | 5.5.0 |
| gradio_project | gradio | >= 5.0.0 < 5.5.0 | 5.5.0 |
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
GHSA
Gradio vulnerable to arbitrary file read with File and UploadButton components
ghsa·2024-11-06
CVE-2024-51751 [MEDIUM] CWE-200 Gradio vulnerable to arbitrary file read with File and UploadButton components
Gradio vulnerable to arbitrary file read with File and UploadButton components
### Summary
If File or UploadButton components are used as a part of Gradio application to preview file content, an attacker with access to the application might abuse these components to read arbitrary files from the application server.
### Details
Consider the following application where a user can upload a file and preview its content:
```
import gradio as gr
def greet(value: bytes):
return str(value)
demo = gr.Interface(fn=greet, inputs=gr.File(type="binary"), outputs="textbox")
if __name__ == "__main__":
demo.launch()
```
If we run this application and make the following request (which attempts to read the `/etc/passwd` file)
```
curl 'http://127.0.0.1:7860/gradio_api/run/predict' -H 'content-type: ap
OSV
Gradio vulnerable to arbitrary file read with File and UploadButton components
osv·2024-11-06
CVE-2024-51751 [MEDIUM] Gradio vulnerable to arbitrary file read with File and UploadButton components
Gradio vulnerable to arbitrary file read with File and UploadButton components
### Summary
If File or UploadButton components are used as a part of Gradio application to preview file content, an attacker with access to the application might abuse these components to read arbitrary files from the application server.
### Details
Consider the following application where a user can upload a file and preview its content:
```
import gradio as gr
def greet(value: bytes):
return str(value)
demo = gr.Interface(fn=greet, inputs=gr.File(type="binary"), outputs="textbox")
if __name__ == "__main__":
demo.launch()
```
If we run this application and make the following request (which attempts to read the `/etc/passwd` file)
```
curl 'http://127.0.0.1:7860/gradio_api/run/predict' -H 'content-type: ap
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
2024-11-06
Published