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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| gradio-app | gradio-app/gradio | unspecified – < 4.13.0 | 4.13.0 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
GitHub 4 repositories
-
DiabloHTB/CVE-2024-1561 ★ 4 · May 11, 2024
Poc for CVE-2024-1561 affecting Gradio 4.12.0
-
DiabloHTB/Nuclei-Template-CVE-2024-1561 ★ 3 · May 12, 2024
Nuclei Templates
-
ImYangC7/hdu-is-lab1 ★ 0 · Oct 27, 2026
Information Security Lab 1: secure REST API, CI security scans, and CVE-2024-1561 analysis
-
WeiTao712/hdu-is-work1 ★ 0 · Oct 27, 2026
HDU IS Work 1 - secure REST API, CI/CD security pipeline, CVE-2024-1561 remediation
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Automated scanner template
A ready-made Nuclei template detects this vulnerability automatically. Vulnerabilities with public scanner templates are typically probed across the internet soon after the template appears — exposed systems should be patched first.
- Gradio 4.3-4.12 - Local File Read http/cves/2024/CVE-2024-1561.yaml
Source: projectdiscovery/nuclei-templates (MIT) — updated daily. Only links are listed.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | gradio | < 4.13.0 | 4.13.0 | GHSA-g9cj-cfpp-4g2x |