Vulnerability · Published Apr 16, 2024 · Assigned by @huntr_ai

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

High 7.5

In plain English

A high-severity security flaw in gradio-app/gradio from gradio-app. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 9.3% (higher than 95% of all known vulnerabilities). Ready-made attack tooling exists: Nuclei, public proof-of-concept code. Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.0)7.5High
Exploit odds (30 days)9.3%top 4.6% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack tooling2Nuclei, Public PoC

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
PyPIgradio4.13.0GHSA-g9cj-cfpp-4g2x
PyPIgradio4.13.0PYSEC-2026-1415

Affected products (as reported)

VendorProductVersions
gradio-app gradio-app/gradio unspecified – before 4.13.0

Weakness: CWE-29 · Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

References