Gradio Allows Unauthorized File Copy via Path Manipulation
Description
Gradio is an open-source Python package that allows quick building of demos and web application for machine learning models, API, or any arbitrary Python function. Prior to version 5.31.0, an arbitrary file copy vulnerability in Gradio's flagging feature allows unauthenticated attackers to copy any readable file from the server's filesystem. While attackers can't read these copied files, they can cause DoS by copying large files (like /dev/urandom) to fill disk space. This issue has been patched in version 5.31.0.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
An arbitrary file copy vulnerability in Gradio's flagging feature (prior to 5.31.0) lets unauthenticated attackers copy any readable file to cause disk-fill denial of service.
An arbitrary file copy vulnerability exists in the flagging feature of Gradio, an open-source Python package for building machine learning demos and web applications. Prior to version 5.31.0, the feature does not properly validate file paths provided by users, allowing an attacker to specify arbitrary paths on the server's filesystem for copying. This flaw stems from insufficient input sanitization in the code handling file operations during the flagging process [2][3].
The attack surface is accessible to any unauthenticated attacker who can interact with a Gradio instance's API or web interface. No special privileges or network position are required—the attacker only needs to craft a request that includes a path to a target file (e.g., /dev/urandom) and trigger the flagging action. The vulnerability does not require any user interaction, as the attacker can send the malicious request directly to the server [2][3].
While the attacker cannot read the content of the copied files, the impact is a denial of service (DoS) through disk space exhaustion. By repeatedly copying large files (such as /dev/urandom, which generates an unending stream of data), the attacker can fill the server's storage, potentially causing the application or even the entire system to become unresponsive. This availability impact is considered severe because it can be triggered with minimal effort and without authentication [2][3].
The vulnerability has been patched in Gradio version 5.31.0. Users are strongly advised to upgrade to this or a later release to mitigate the risk. There are no known public exploit codes at the time of disclosure, but the issue is trivial to exploit, and upgrading is the recommended remediation [2][3].
AI Insight generated on May 20, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
gradioPyPI | < 5.31.0 | 5.31.0 |
Affected products
3- Range: <5.31.0
- gradio-app/gradiov5Range: < 5.31.0
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
3- github.com/advisories/GHSA-8jw3-6x8j-v96gghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2025-48889ghsaADVISORY
- github.com/gradio-app/gradio/security/advisories/GHSA-8jw3-6x8j-v96gghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.