Gradio allows users to access arbitrary files
Gradio applications with a public link allowed users to access arbitrary files on the hosting machine by intercepting and modifying network requests. An attacker could read files outside the intended application directory.
gradio-app/gradio
Originally disclosed on huntr
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
From the GitHub Advisory Database (GHSA-m842-4qm8-7gpq, CC BY 4.0).
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 server did not properly validate or restrict the file paths requested by the client, allowing path traversal.
Impact
An attacker could read arbitrary files on the machine hosting the Gradio application, potentially exposing sensitive information.
What the attacker needed
Publicly accessible Gradio app; ability to intercept/modify requests
The fix
The problem was fixed in Gradio version 4.19.2 and higher.
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.
Gradio is a tool for building web apps for machine learning demos. This bug meant that someone using such an app could trick it into showing files from the computer running the app, not just the files it was meant to show. They did this by changing the requests the app sends to its server.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.