PYSEC-2026-1409: CSRF Vulnerability in gradio-app/gradio
A Cross-Site Request Forgery (CSRF) vulnerability in gradio-app/gradio allows attackers to upload multiple large files to a victim's system if they are running Gradio locally. By crafting a malicious HTML page that triggers an unauthorized file upload to the victim's server, an attacker can deplete the system's disk space, potentially leading to a denial of service. This issue affects the file upload functionality as implemented in gradio/routes.py.
Affected Software
Event History
Frequently Asked Questions
Who is exposed to this issue?
Users running Gradio locally are exposed, particularly where the local Gradio server can receive requests triggered by a malicious HTML page opened by the user.
What does an attacker need to exploit it?
The attacker needs to convince a user to interact with a malicious HTML page. No attacker privileges are required, and the page can trigger unauthorized uploads to the victim's local Gradio server.
What is the practical impact?
An attacker can cause multiple large files to be uploaded, consuming disk space on the victim's system. This can lead to a denial of service.
How can teams identify potentially affected deployments?
Review locally running Gradio instances that expose file-upload functionality implemented through gradio/routes.py. The provided information does not identify affected versions or a specific detection method.