Files on the host computer can be accessed from the Gradio interface
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.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Python (PyPI) | gradio | < 2.5.0 | 2.5.0 |
References
- https://github.com/gradio-app/gradio/commit/41bd3645bdb616e1248b2167ca83636a2653f781
- https://github.com/gradio-app/gradio/security/advisories/GHSA-rhq2-3vr9-6mcr
- https://nvd.nist.gov/vuln/detail/CVE-2021-43831
- https://github.com/gradio-app/gradio
- https://github.com/pypa/advisory-database/tree/main/vulns/gradio/PYSEC-2021-873.yaml
- CVSS vector
CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L- Weakness (CWE)
CWE-22- Platform
- Python (PyPI)
- Package
gradio- Disclosed
- 15.12.2021
- Updated
- 11.10.2026 13:19
Sources and licenses
OSV / GitHub Advisory Database - PYSEC-2021-873 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-rhq2-3vr9-6mcr - CC BY 4.0
Vulnerability history: gradio
All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 51
- First → latest
- 12.2021 07.2026
- Without a fix
- 13
- Exploited in attacks
- 0
Severity breakdown
- Critical 5
- High 19
- Medium 22
- Low 5
Disclosures per year
- 2021: 1
- 2022: 1
- 2023: 5
- 2024: 28
- 2025: 9
- 2026: 7
-
Files on the host computer can be accessed from the Gradio interface this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.