NA

CVE-2024-1561

Published: 16/04/2024 Updated: 10/05/2024

Vulnerability Summary

An issue exists 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 malicious users 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.

Vulnerability Trend

Github Repositories

Poc for CVE-2024-1561 affecting Gradio 4.12.0

CVE-2024-1561 PoC Script This is a Proof of Concept (PoC) script for CVE-2024-1561 Check the full writeup for the CVE here: huntrcom/bounties/4acf584e-2fe8-490e-878d-2d9bf2698338 Affected Version: Gradio 4120 This was fixed in this PR (gradio-app/gradio#6884) and was released in version 4130 Usage Clone the repository and Navigate to the directory: git clone ht

Nuclei Templates

CVE-2024-1561 Nuclei Template This Nuclei template is designed to detect the Gradio CVE-2024-1561 vulnerability in web applications Gradio is a Python library for creating customizable UI components around machine learning models This vulnerability may allow attackers to read files from the server Running the template Clone this repository to your local machine and run using