Any organization hosting public-facing Gradio instances with custom components should patch to 4.44+ immediately — no authentication is required to exploit this. The attack is trivial (one-level directory traversal via crafted HTTP request) and could expose proprietary ML inference code, embedded secrets, or business logic in custom components. Low EPSS suggests limited active exploitation today, but the low friction means opportunistic scanning is realistic.
Risk Assessment
Effective risk is medium-to-high for organizations using Gradio custom components on internet-facing servers, despite the CVSS 5.3 rating. The no-auth, network-accessible attack vector eliminates most barriers. Gradio is extensively used for AI/ML demos and internal tooling that often get inadvertently exposed publicly. The one-level traversal limit constrains impact but does not eliminate it — adjacent files to component directories (configs, init files, API keys hardcoded in source) are in scope. EPSS of 0.245% is low but the ease of exploitation warrants proactive patching.
Affected Systems
Severity & Risk
Attack Surface
Recommended Action
6 steps-
Patch immediately: upgrade to gradio>=4.44.0 (pip install --upgrade gradio).
-
If patching is blocked, sanitize file path inputs in custom component endpoint handlers and relocate component code outside publicly accessible directories.
-
Audit all production Gradio deployments — inventory which expose custom components and whether they are internet-accessible.
-
Review web server/application logs for requests to /custom_component containing ../ or %2e%2e patterns as indicators of prior exploitation.
-
Rotate any secrets (API keys, tokens) found in custom component source files as a precaution.
-
Apply network-level controls (WAF rule blocking path traversal patterns, IP allowlisting) as defense-in-depth.
CISA SSVC Assessment
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
Classification
Compliance Impact
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2024-47166?
Any organization hosting public-facing Gradio instances with custom components should patch to 4.44+ immediately — no authentication is required to exploit this. The attack is trivial (one-level directory traversal via crafted HTTP request) and could expose proprietary ML inference code, embedded secrets, or business logic in custom components. Low EPSS suggests limited active exploitation today, but the low friction means opportunistic scanning is realistic.
Is CVE-2024-47166 actively exploited?
No confirmed active exploitation of CVE-2024-47166 has been reported, but organizations should still patch proactively.
How to fix CVE-2024-47166?
1. Patch immediately: upgrade to gradio>=4.44.0 (pip install --upgrade gradio). 2. If patching is blocked, sanitize file path inputs in custom component endpoint handlers and relocate component code outside publicly accessible directories. 3. Audit all production Gradio deployments — inventory which expose custom components and whether they are internet-accessible. 4. Review web server/application logs for requests to /custom_component containing ../ or %2e%2e patterns as indicators of prior exploitation. 5. Rotate any secrets (API keys, tokens) found in custom component source files as a precaution. 6. Apply network-level controls (WAF rule blocking path traversal patterns, IP allowlisting) as defense-in-depth.
What systems are affected by CVE-2024-47166?
This vulnerability affects the following AI/ML architecture patterns: ML UI/demo applications, Model serving, Prototype deployments, Internal AI tooling.
What is the CVSS score for CVE-2024-47166?
CVE-2024-47166 has a CVSS v3.1 base score of 5.3 (MEDIUM). The EPSS exploitation probability is 0.24%.
Technical Details
NVD 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.
Exploitation Scenario
An adversary performing reconnaissance on a target organization discovers a public-facing Gradio demo used for internal model access (common in AI/ML teams). They identify the /custom_component endpoint and craft HTTP GET requests with one-level path traversal (e.g., /custom_component/../config.py or /custom_component/../__init__.py). Without any authentication, they retrieve source code files adjacent to the component directory. The exfiltrated code reveals hardcoded API keys for downstream LLM services, internal model API endpoints, or proprietary data transformation logic — enabling further lateral movement or competitive intelligence theft.
Weaknesses (CWE)
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N References
Timeline
Related Vulnerabilities
CVE-2024-39236 9.8 Gradio: code injection via component metadata (CVSS 9.8)
Same package: gradio CVE-2023-25823 9.8 Gradio: hardcoded SSH key leaks via share=True demos
Same package: gradio CVE-2024-47167 9.8 Gradio: unauthenticated SSRF in /queue/join, internal pivot
Same package: gradio CVE-2024-0964 9.4 Gradio: unauthenticated LFI exposes full server filesystem
Same package: gradio CVE-2023-34239 9.1 Gradio: path traversal + SSRF exposes model files & infra
Same package: gradio
AI Threat Alert