Files on the host computer can be accessed from the Gradio interface
Critical8.3CVE-2021-43831 · Published Jan 21, 2022 · updated Jul 8, 2026
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| gradio PyPI | < 2.5.0 | 2.5.0 |
Details and references
### 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 1. 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 2. We enabled a notification that is printed to anyone using an older version of gradio telling them to upgrade (see screenshot below) 3. 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`.
- CVSS 3.1
- CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L
- Severity from
- GitHub (reviewed advisory)
- Weakness
- CWE-22
- Also known as
- CVE-2021-43831, PYSEC-2021-873
More Gradio advisories
All Gradio| Date | Advisory | Severity | Fixed in |
|---|---|---|---|
| Mar 182022 | Improper Neutralization of Formula Elements in a CSV File in Gradio Flagging CVE-2022-24770High8.8fixed in 2.8.11 | High8.8 | 2.8.11 |
| Feb 232023 | Update share links to use FRP instead of SSH tunneling CVE-2023-25823Medium5.4fixed in 3.13.1 | Medium5.4 | 3.13.1 |
| Jun 92023 | Gradio vulnerable to arbitrary file read and proxying of arbitrary URLs CVE-2023-34239Medium7.3fixed in 3.34.0 | Medium7.3 | 3.34.0 |
| Sep 162023 | Gradio arbitrary file upload vulnerability CVE-2023-41626Medium4.8no fix yet | Medium4.8 | No fix yet |
| Dec 142023 | Gradio Exposure of Sensitive Information to an Unauthorized Actor vulnerability CVE-2023-6572Critical9.6fixed in 4.14.0 | Critical9.6 | 4.14.0 |
| Dec 212023 | Gradio makes the `/file` secure against file traversal and server-side request forgery attacks CVE-2023-51449High8.6fixed in 4.11.0 | High8.6 | 4.11.0 |