7.7high
Files on the host computer can be accessed from the Gradio interface
- Severity
- 7.7high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 3.84% (higher than 90% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-rhq2-3vr9-6mcrPYSEC-2021-873
Description
Gradio is an open source framework for building interactive machine learning models and demos. In versions prior to 2.5.0 there is a vulnerability that affects anyone who creates and publicly shares Gradio interfaces. File paths are not restricted and users who receive a Gradio link can access any files on the host computer if they know the file names or file paths. This is limited only by the host operating system. Paths are opened in read only mode. The problem has been patched in gradio 2.5.0.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| gradio-app gradio | < 2.5.0 | CVE List |
| gradio (PyPI) | before 2.5.0, before 41bd3645bdb616e1248b2167ca83636a2653f781 | GitHub Advisory Database, PyPA Advisory Database |
| gradio_project gradio | before 2.5.0 | NVD |
All scores
| GitHub_M | 7.7high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N |
| GitHub | 8.3critical CVSS:3.1 | CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L |
| GitHub | critical CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N |
| NVD | 7.7high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N |
| NVD | 3.5low CVSS:2.0 | AV:N/AC:M/Au:S/C:P/I:N/A:N |
Classification
What each source says
CVE List
Gradio is an open source framework for building interactive machine learning models and demos. In versions prior to 2.5.0 there is a vulnerability that affects anyone who creates and publicly shares Gradio interfaces. File paths are not restricted and users who receive a Gradio link can access any files on the host computer if they know the file names or file paths. This is limited only by the host operating system. Paths are opened in read only mode. The problem has been patched in gradio 2.5.0.
GitHub Advisory Database
Impact
This is a vulnerability that affects anyone who creates and publicly shares Gradio interfaces using gradio<2.4.8. Because of the way that static files were being served, someone who generated a public Gradio link and shared it with others would potentially be exposing the files on the computer that generated the link, while the link was active. An attacker would be able to view the contents of a file on the computer if they knew the exact relative filepath. We do not have any evidence that this was ever exploited, but we treated the issue seriously and immediately took steps to mitigate it (see below)
Response
- We worked with @haby0 to immediately patch the issue and released a new version,
gradio 2.5.0, within 24 hours of the issue being brought to our attention - We enabled a notification that is printed to anyone using an older version of gradio telling them to upgrade (see screenshot below)
- We expanded our test suite to test for this vulnerability ensuring that our patch does not get reverted in future releases of
gradio
Patches
The problem has been patched in gradio>=2.5.0.
NVD (es)
Gradio es un marco de trabajo de código abierto para la construcción de modelos y demostraciones interactivas de aprendizaje automático. En las versiones anteriores a 2.5.0, se presenta una vulnerabilidad que afecta a cualquiera que cree y comparta públicamente interfaces de Gradio. Las rutas de los archivos no están restringidas y los usuarios que reciben un enlace de Gradio pueden acceder a cualquier archivo del ordenador anfitrión si conocen los nombres o las rutas de los archivos. Esto está limitado únicamente por el sistema operativo del host. Las rutas son abiertas en modo de sólo lectura. El problema ha sido parcheado en gradio versión 2.5.0
References
| https://github.com/gradio-app/gradio/security/advisories/GHSA-rhq2-3vr9-6mcr | advisory, exploit, third-party-advisory, web | |
| https://github.com/gradio-app/gradio/commit/41bd3645bdb616e1248b2167ca83636a2653f781 | fix, patch, third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2021-43831 | advisory | |
| https://github.com/gradio-app/gradio | package | |
| https://github.com/pypa/advisory-database/tree/main/vulns/gradio/PYSEC-2021-873.yaml | web | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-43831 changed 2024-08-04 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-rhq2-3vr9-6mcr changed 2026-07-08 | CC-BY-4.0 |
| NVD | CVE-2021-43831 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2021-873 changed 2023-11-08 | CC-BY-4.0 |