5.6medium
Make the `/file` secure against file traversal attacks
- Severity
- 5.6medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 28.3% (higher than 98% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-6qm2-wpxq-7qh2PYSEC-2023-249
Description
Gradio is an open-source Python package that allows you to quickly build a demo or web application for your machine learning model, API, or any arbitary Python function. Versions of `gradio` prior to 4.11.0 contained a vulnerability in the `/file` route which made them susceptible to file traversal attacks in which an attacker could access arbitrary files on a machine running a Gradio app with a public URL (e.g. if the demo was created with `share=True`, or on Hugging Face Spaces) if they knew the path of files to look for. This issue has been patched in version 4.11.0.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| gradio-app gradio | < 4.11.0 | CVE List |
| gradio (PyPI) | before 4.11.0, before 1b9d4234d6c25ef250d882c7b90e1f4039ed2d76, before 7ba8c5da45b004edd12c0460be9222f5b5f5f055 | GitHub Advisory Database, PyPA Advisory Database |
| gradio_project gradio | before 4.11.0 | NVD |
All scores
| GitHub_M | 5.6medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L |
| GitHub | 8.6high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L |
| NVD | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| PyPA Advisory Database | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
Gradio is an open-source Python package that allows you to quickly build a demo or web application for your machine learning model, API, or any arbitary Python function. Versions of `gradio` prior to 4.11.0 contained a vulnerability in the `/file` route which made them susceptible to file traversal attacks in which an attacker could access arbitrary files on a machine running a Gradio app with a public URL (e.g. if the demo was created with `share=True`, or on Hugging Face Spaces) if they knew the path of files to look for. This issue has been patched in version 4.11.0.
GitHub Advisory Database
Older versions of gradio contained a vulnerability in the /file route which made them susceptible to file traversal attacks in which an attacker could access arbitrary files on a machine running a Gradio app with a public URL (e.g. if the demo was created with share=True, or on Hugging Face Spaces) if they knew the path of files to look for.
This was not possible through regular URLs passed into a browser, but it was possible through the use of programmatic tools such as curl with the --pass-as-is flag.
Furthermore, the /file route in Gradio apps also contained a vulnerability that made it possible to use it for SSRF attacks.
Both of these vulnerabilities have been fixed in gradio==4.11.0
NVD (es)
Gradio es un paquete Python de código abierto que le permite crear rápidamente una demostración o una aplicación web para su modelo de aprendizaje automático, API o cualquier función arbitraria de Python. Las versiones de `gradio` anteriores a la 4.11.0 contenían una vulnerabilidad en la ruta `/file` que las hacía susceptibles a ataques transversales de archivos en los que un atacante podía acceder a archivos arbitrarios en una máquina que ejecutaba una aplicación Gradio con una URL pública (por ejemplo, si la demostración se creó con `share=True`, o en Hugging Face Spaces) si conocían la ruta de los archivos a buscar. Este problema se solucionó en la versión 4.11.0.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2023-51449 changed 2024-08-02 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-6qm2-wpxq-7qh2 changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2023-51449 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2023-249 changed 2024-01-17 | CC-BY-4.0 |