What’s Vulnerable › Vulnerabilities
CVE-2021-43831: Files on the host computer can be accessed from the Gradio interface
- Severity: high (CVSS 7.7 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 3.9% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2021-12-15 · updated 2026-06-17
- Weakness: CWE-22
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 products
- gradio-app gradio: before 2.5.0 — fixed in 2.5.0
How to fix
Upgrade to a fixed version: gradio-app gradio 2.5.0. Check the vendor advisory for mitigations.
References
- https://github.com/gradio-app/gradio/commit/41bd3645bdb616e1248b2167ca83636a2653f781
- https://github.com/gradio-app/gradio/security/advisories/GHSA-rhq2-3vr9-6mcr
- https://github.com/gradio-app/gradio/commit/41bd3645bdb616e1248b2167ca83636a2653f781
- https://github.com/gradio-app/gradio/security/advisories/GHSA-rhq2-3vr9-6mcr
Get alerted when CVE-2021-43831 or the next vulnerability affects your stack