PT-2025-23225 · Gradio · Gradio
Jjjutla
+1
·
Published
2025-05-29
·
Updated
2025-10-15
·
CVE-2025-48889
CVSS v3.1
7.5
High
| Vector | AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Name of the Vulnerable Software and Affected Versions
Gradio versions prior to 5.31.0
Description
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 to fill disk space. The flagging component doesn't properly validate file paths before copying files. Attackers can send specially crafted requests to the "/gradio api/run/predict" endpoint to trigger these file copies. The vulnerable code flow involves a JSON payload sent to this endpoint, where the
path field within the FileData object can reference any file on the system. The FileData. copy to dir() method uses this path without proper validation, allowing the copying of any file the Gradio process can read.Recommendations
For Gradio versions prior to 5.31.0, update to version 5.31.0 or later to resolve the issue. As a temporary workaround, consider restricting access to the "/gradio api/run/predict" endpoint to minimize the risk of exploitation. Additionally, restrict the use of the
path parameter in the flagging functionality JSON payload to prevent unauthorized file copies.Exploit
Fix
DoS
Unrestricted File Upload
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Gradio