Skip to content
CSRF Disclosed report Intermediate CVE-2024-1727

Gradio applications running locally vulnerable to 3rd party websites accessing routes and uploading files

Gradio applications running locally could be accessed by third-party websites, allowing them to upload files to the local server. An attacker could host a malicious script that uploads a large file to a victim's local Gradio instance.

gradio-app/gradio

Originally disclosed on huntr

Impact

This CVE covers the ability of 3rd party websites to access routes and upload files to users running Gradio applications locally. For example, the malicious owners of www.dontvisitme.com could put a script on their website that uploads a large file to http://localhost:7860/upload and anyone who visits their website and has a Gradio app will now have that large file uploaded on their computer

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/84802ee6a4806c25287344dce581f9548a99834a CVE: https://nvd.nist.gov/vuln/detail/CVE-2024-1727

From the GitHub Advisory Database (GHSA-48cq-79qq-6f7x, CC BY 4.0).

The original report as published on the GitHub Advisory Database. Images and videos are our own copies; raw HTML is shown as text. View it on GitHub Advisory Database.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the local Gradio server did not properly restrict cross-origin requests, allowing any website to interact with its routes.

Impact

A malicious website could cause a large file to be uploaded to a victim's local Gradio app, potentially filling disk space or disrupting the application.

What the attacker needed

Victim runs a local Gradio app; victim visits a malicious website

The fix

The issue was fixed in Gradio version 4.19.2 and later.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

When you run a Gradio app on your own computer, it starts a small web server that only you should be able to use. This report says that any website you visit could secretly send requests to that local server, for example to upload a file. That means a malicious site could fill up your disk or interfere with your app without you knowing.

What is CSRF?

Another site makes a signed-in user's browser perform an action they did not intend.

More from gradio-app/gradio

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site request forgery (CSRF)

The lesson behind this report.

Another site makes a signed-in user's browser perform an action they did not intend.