Headline
GHSA-g9cj-cfpp-4g2x: gradio vulnerable to Path Traversal
An issue was discovered in gradio-app/gradio, where the /component_server
endpoint improperly allows the invocation of any method on a Component
class with attacker-controlled arguments. Specifically, by exploiting the move_resource_to_block_cache()
method of the Block
class, an attacker can copy any file on the filesystem to a temporary directory and subsequently retrieve it. This vulnerability enables unauthorized local file read access, posing a significant risk especially when the application is exposed to the internet via launch(share=True)
, thereby allowing remote attackers to read files on the host machine. Furthermore, gradio apps hosted on huggingface.co
are also affected, potentially leading to the exposure of sensitive information such as API keys and credentials stored in environment variables.
Skip to content
Actions
Automate any workflow
Packages
Host and manage packages
Security
Find and fix vulnerabilities
Codespaces
Instant dev environments
Copilot
Write better code with AI
Code review
Manage code changes
Issues
Plan and track work
Discussions
Collaborate outside of code
GitHub Sponsors
Fund open source developers
* The ReadME Project
GitHub community articles
- Pricing
Provide feedback
Saved searches****Use saved searches to filter your results more quickly
Sign up
- GitHub Advisory Database
- GitHub Reviewed
- CVE-2024-1561
gradio vulnerable to Path Traversal
High severity GitHub Reviewed Published Apr 16, 2024 to the GitHub Advisory Database • Updated Apr 16, 2024
Affected versions
< 4.13.0
Description
An issue was discovered in gradio-app/gradio, where the /component_server endpoint improperly allows the invocation of any method on a Component class with attacker-controlled arguments. Specifically, by exploiting the move_resource_to_block_cache() method of the Block class, an attacker can copy any file on the filesystem to a temporary directory and subsequently retrieve it. This vulnerability enables unauthorized local file read access, posing a significant risk especially when the application is exposed to the internet via launch(share=True), thereby allowing remote attackers to read files on the host machine. Furthermore, gradio apps hosted on huggingface.co are also affected, potentially leading to the exposure of sensitive information such as API keys and credentials stored in environment variables.
References
- https://nvd.nist.gov/vuln/detail/CVE-2024-1561
- gradio-app/gradio@24a5836
- https://huntr.com/bounties/4acf584e-2fe8-490e-878d-2d9bf2698338
Published to the GitHub Advisory Database
Apr 16, 2024
Last updated
Apr 16, 2024