---
id: "CVE-2024-1728"
kind: "vulnerability"
aliases: ["CVE-2024-1728", "GHSA-m842-4qm8-7gpq"]
title: "Gradio allows users to access arbitrary files"
severity: "critical"
cvss: 8.1
epss: 0.85393
exploited: false
status: "open"
category: "package"
products: [{"name": "gradio", "fixed": ["4.19.2"], "affected": "< 4.19.2", "ecosystem": "pypi"}, {"name": "gradio project gradio", "fixed": ["4.19.2"], "affected": ">= 4.18.0, < 4.19.2", "ecosystem": "vendor"}]
ecosystems: ["pypi", "vendor"]
tags: ["cwe-22", "gradio", "hugging-face-spaces", "package", "python", "self-hosted"]
not_affected_if: ["already-on-4.19.2-or-higher", "local-only-network"]
published_at: "2024-04-10T17:15:53+00:00"
first_seen_at: "2026-10-27T16:35:55+00:00"
updated_at: "2026-10-27T17:03:04+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-m842-4qm8-7gpq", "first_seen_at": "2026-10-27T16:35:55+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-1728", "first_seen_at": "2026-10-27T17:03:04+00:00"}]
---

# Gradio allows users to access arbitrary files

Gradio applications exposed through a public link, such as on Hugging Face Spaces, let users read arbitrary files from the machine hosting the app. An attacker can intercept and modify the app's network requests to reach files outside the intended scope.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- pypi:gradio affected < 4.19.2 fixed 4.19.2
- vendor:gradio project gradio affected >= 4.18.0, < 4.19.2 fixed 4.19.2

## How to check

- Run `pip show gradio` and compare the version against `4.19.2`
- Check whether the app is launched with a public share link or hosted on Hugging Face Spaces

## Fix

- Upgrade the `gradio` package to `4.19.2` or higher
- Redeploy the app after upgrading

## Timeline

- 2026-10-27T16:35:55+00:00 ghsa https://github.com/advisories/GHSA-m842-4qm8-7gpq
- 2026-10-27T17:03:04+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2024-1728

## From the sources

### Impact
This vulnerability allows users of Gradio applications that have a public link (such as on Hugging Face Spaces) to access files on the machine hosting the Gradio application. This involves intercepting and modifying the network requests made by the Gradio app to the server. 

### Patches
Yes, the problem has been patched in Gradio version 4.19.2 or higher. We have no knowledge of this exploit being used against users of Gradio applications, but we encourage all users to upgrade to Gradio 4.19.2 or higher.

Fixed in: https://github.com/gradio-app/gradio/commit/16fbe9cd0cffa9f2a824a0165beb43446114eec7
CVE: https://nvd.nist.gov/vuln/detail/CVE-2024-1728

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
