Gradio has a one-level read path traversal in `/custom_component`
CVE-2024-47166 · GHSA-37qc-qgx6-9xjv · published 2024-10-10 · updated 2025-01-21
- Severity
- Medium
- CVSS score
- 5.3
- Chance of exploitation (EPSS)
- 0.44%
- Fixed in
- 4.44.0
- Exploitation No known exploitation
- Automatable No
- Technical impact Partial
- CISA SSVC
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.
Upgrade gradio to 4.44.0 or later.
Yes, please upgrade to gradio>=4.44 to address this issue.
Is there a way for users to fix or remediate the vulnerability without upgrading? As a workaround, developers can sanitize the file paths and ensure that components are not stored in publicly accessible directories.
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| gradio | PyPI | < 4.44.0 | 4.44.0 |
- CriticalMCP Path Traversal Allows Full-Filesystem Read and JWT Secret Exfiltration Leading to Account Takeoverlangflow, langflow-base
- Critical@zereight/mcp-gitlab: Unauthenticated arbitrary file read via `upload_markdown` enables PAT exfiltration and full account takeover@zereight/mcp-gitlab
- CriticalFlowise RCE via SQL Database Chain Nodeflowise, flowise-components
- CriticalLangroid: SQLChatAgent dangerous-function blocklist can be bypassed with quoted or schema-qualified pg_read_file callslangroid
- Criticalfast-mcp-telegram: Bearer token path traversal bypasses reserved Telegram session protectionfast-mcp-telegram
- CriticalMCP Toolbox HTTP tool path parameters allow traversal to unintended endpointsgithub.com/googleapis/mcp-toolbox
- CriticalGradio Blocked Path ACL Bypass Vulnerabilitygradio
- CriticalGradio allows users to access arbitrary filesgradio
- CriticalGradio Exposure of Sensitive Information to an Unauthorized Actor vulnerabilitygradio
- CriticalFiles on the host computer can be accessed from the Gradio interfacegradio
- HighGradio FileExplorer preprocess path traversal allows files outside root_dir to reach callbacksgradio
- HighGradio contains a cookie injection vulnerabilitygradio
The impact, patch and workaround text comes from the advisory, shortened (GitHub Advisory Database, CC BY 4.0). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.