CVE-2024-1561 in Gradio Project Gradio
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...
Affects 1 product from 1 vendor. Facts below cite their sources.
Remotely exploitable over the network, low complexity, no authentication required, no user interaction needed, impact contained to the vulnerable component, full confidentiality impact, no integrity impact, no availability impact.
Affected products and versions
| Vendor | Product | Affected versions |
|---|---|---|
| Gradio Project | Gradio | ≥ 4.12.0, < 4.13.0 |
A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.
Fix and vendor advisory
No official vendor advisory link on record. See the CVE record.
Exploitation
| CISA known-exploited | Not in the CISA KEV catalog |
|---|---|
| Public exploit | Not confirmed |
Official 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.
Source: NIST NVD / MITRE CVE.
Record details
| CVE ID | CVE-2024-1561 |
|---|---|
| BreachSpider ID | BS-2024-GLOBAL-269667-H |
| CVSS vector | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| Published | 2024-04-16 |
| Last modified | 2026-06-17 |
| Weakness (CWE) | |
| Source | NVD |
Weakness definitions
CWE-29: CWE-29
Analysis AI-written, not human-reviewed
A vulnerability in gradio-app/gradio allows attackers to invoke any method on a Component class with attacker-controlled arguments, specifically enabling the copying of any file on the filesystem to a temporary directory and subsequent retrieval.
The vulnerability exists in the `/component_server` endpoint of gradio-app/gradio. An attacker can exploit the `move_resource_to_block_cache()` method of the `Block` class to copy any file on the filesystem to a temporary directory and retrieve it.
Questions
What is CVE-2024-1561?
A vulnerability in gradio-app/gradio allows attackers to invoke any method on a Component class with attacker-controlled arguments, specifically enabling the copying of any file on the filesystem to a temporary directory and subsequent retrieval.
What is the CVSS score for CVE-2024-1561?
CVE-2024-1561 has CVSS 7.5 (High). Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N. EPSS: 9.2%.
Is CVE-2024-1561 actively exploited?
No confirmed active exploitation of CVE-2024-1561 as of 2026-09-25.
How do I remediate CVE-2024-1561?
Priority: IMMEDIATE.
What systems are affected by CVE-2024-1561?
CVE-2024-1561 affects Gradio Project Gradio.
For developers and AI agents
Run this check from your own code or agent
REST API
curl -s https://breachspider.com/api/v1/assets/correlate-cves \
-H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"assets":[{"asset_id":"dev-1","vendor":"Gradio Project","product":"Gradio","version":"1.0"}]}'
MCP for AI agents
# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp
Free trial: 14 days, 750 device checks, no card.
Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-06-17.