CVE-2024-47166

One-level read path traversal in `/custom_component` in Gradio

Description

Gradio is an open-source Python package designed for quick prototyping. This vulnerability involves a **one-level read path traversal** in the `/custom_component` endpoint. Attackers can exploit this flaw to access and leak source code from custom Gradio components by manipulating the file path in the request. Although the traversal is limited to a single directory level, it could expose proprietary or sensitive code that developers intended to keep private. This impacts users who have developed custom Gradio components and are hosting them on publicly accessible servers. Users are advised to upgrade to `gradio>=4.44` to address this issue. As a workaround, developers can sanitize the file paths and ensure that components are not stored in publicly accessible directories.

Category

2.3
CVSS
Severity: Low
CVSS 4.0 •
CVSS 3.1 •
EPSS 0.11%
Third-Party Advisory github.com
Affected: gradio-app gradio
Published at:
Updated at:

References

Frequently Asked Questions

What is the severity of CVE-2024-47166?
CVE-2024-47166 has been scored as a low severity vulnerability.
How to fix CVE-2024-47166?
To fix CVE-2024-47166, 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-47166 being actively exploited in the wild?
As for now, there are no information to confirm that CVE-2024-47166 is being actively exploited. According to its EPSS score, there is a ~0% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2024-47166?
CVE-2024-47166 affects 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.