CVE-2024-1561

Arbitrary Local File Read via Component Method Invocation in gradio-app/gradio

HIGH
7.5
CVSS Score
Published: April 16, 2024 at 12:00 AM UTC
Updated: June 17, 2026 at 07:04 AM UTC
2 products affected across 2 vendorsGradioProject Gradio

Using gradio-app/gradio by gradio-app?

Get instant alerts when new vulnerabilities affect gradio-app/gradio - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.5
Exploit prediction
EPSS 9%
SSVC
PoC

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

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

4.12.0 ≤ v < 4.13.04.12.0
Affected range stops below 4.13.0, so it looks safe — our inference, not a vendor statement
v < 4.13.0
Affected range stops below 4.13.0, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

SSVC — Action Prioritization

SSVCPoCAutomatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

7.5HIGH@huntr_ai
Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
NONE
Availability
NONE
Vector?

Quick Info

StatusANALYZED
CWE
CWE-29

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card