CVE-2021-43831
lowpriority · track · 32EPSS 0.039 · 90 %ileEUUSEPSS · scored 2026-10-27
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.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · low–high · 3.5–8.3
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (3)
Products and version ranges known to be affected.
advisories (2)
Vendor and ecosystem advisories describing this.
- GHSA-rhq2-3vr9-6mcrFiles on the host computer can be accessed from the Gradio interface2022-01-21ghsa · osvUS
### 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`.
- PYSEC-2021-8732021-12-15vendor · osvUS
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.
also known as (6)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (7)
External citations — patches, advisories, analysis.
- https://github.com/gradio-app/gradio/commit/41bd3645bdb616e1248b2167ca83636a2653f781cnnvd
- https://github.com/gradio-app/gradio/security/advisories/GHSA-rhq2-3vr9-6mcrcnnvd
- https://nvd.nist.gov/vuln/detail/CVE-2021-43831cnnvd
- https://github.com/gradio-app/gradio/commit/41bd3645bdb616e1248b2167ca83636a2653f781enisa_euvd
- https://github.com/gradio-app/gradio/security/advisories/GHSA-rhq2-3vr9-6mcrenisa_euvd
- https://github.com/gradio-app/gradio/commit/41bd3645bdb616e1248b2167ca83636a2653f781PatchThird Party Advisorynvd
- https://github.com/gradio-app/gradio/security/advisories/GHSA-rhq2-3vr9-6mcrExploitThird Party Advisorynvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan