CVE-2024-1561

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

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.

Category

7.5
CVSS
Severity: High
CVSS 3.0 •
EPSS 92.90% Top 5%
Affected: gradio-app gradio-app/gradio
Published at:
Updated at:

References

Frequently Asked Questions

What is the severity of CVE-2024-1561?
CVE-2024-1561 has been scored as a high severity vulnerability.
How to fix CVE-2024-1561?
To fix CVE-2024-1561, make sure you are using an up-to-date version of the affected component(s) by checking the vendor release notes. As for now, there are no other specific guidelines available.
Is CVE-2024-1561 being actively exploited in the wild?
It is possible that CVE-2024-1561 is being exploited or will be exploited in a near future based on public information. According to its EPSS score, there is a ~93% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2024-1561?
CVE-2024-1561 affects gradio-app gradio-app/gradio.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.