{"id":"CVE-2024-47166","aliases":["CVE-2024-47166","GHSA-37qc-qgx6-9xjv","PYSEC-2024-197"],"related":[],"kind":"vulnerability","state":"published","title":"One-level read path traversal in `/custom_component` in Gradio","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact  \n**What kind of vulnerability is it? Who is impacted?**\n\nThis 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.\n\n### Patches  \nYes, please upgrade to `gradio>=4.44` to address this issue.\n\n### Workarounds  \n**Is there a way for users to fix or remediate the vulnerability without upgrading?**\n\nAs a workaround, developers can sanitize the file paths and ensure that components are not stored in publicly accessible directories.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Gradio es un paquete Python de código abierto diseñado para la creación rápida de prototipos. Esta vulnerabilidad implica un **path traversal de lectura de un nivel** en el punto de conexión `/custom_component`. Los atacantes pueden explotar esta falla para acceder y filtrar el código fuente de los componentes Gradio personalizados manipulando la ruta del archivo en la solicitud. Aunque el recorrido está limitado a un solo nivel de directorio, podría exponer código propietario o confidencial que los desarrolladores pretendían mantener privado. Esto afecta a los usuarios que han desarrollado componentes Gradio personalizados y los alojan en servidores de acceso público. Se recomienda a los usuarios que actualicen a `gradio&gt;=4.44` para solucionar este problema. Como workaround, los desarrolladores pueden desinfectar las rutas de archivo y asegurarse de que los componentes no se almacenen en directorios de acceso público.","source":"nvd"}],"published":"2024-10-10T21:36:43.000Z","modified":"2026-06-17T07:56:39.523Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","score":2.3,"rating":"LOW"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","score":2.3,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/U:Green","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"rating":"MEDIUM"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"version":"< 4.44","status":"affected"}],"vendor":"gradio-app","product":"gradio","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"4.44.0"}],"ecosystem":"PyPI","package":"gradio","purl":"pkg:pypi/gradio","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"4.44.0"}],"vendor":"gradio_project","product":"gradio","cpe":"cpe:2.3:a:gradio_project:gradio:*:*:*:*:*:python:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"4.44.0"}],"ecosystem":"PyPI","package":"gradio","purl":"pkg:pypi/gradio","source":"pysec"}],"references":[{"url":"https://github.com/gradio-app/gradio/security/advisories/GHSA-37qc-qgx6-9xjv","tags":["advisory","third-party-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-47166","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/gradio-app/gradio","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/gradio/PYSEC-2024-197.yaml","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-10-11T15:26:33.415Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-47166","url":"https://www.cve.org/CVERecord?id=CVE-2024-47166","licence":"CVE Terms of Use","modified":"2024-10-11T15:26:41.421Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-37qc-qgx6-9xjv","url":"https://github.com/advisories/GHSA-37qc-qgx6-9xjv","licence":"CC-BY-4.0","modified":"2025-01-21T18:19:28.009Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-47166","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-47166","licence":"Public domain","modified":"2026-06-17T07:56:39.523Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2024-197","url":"https://osv.dev/vulnerability/PYSEC-2024-197","licence":"CC-BY-4.0","modified":"2025-01-19T16:57:03.769Z"}],"updatedAt":"2026-11-25T22:58:46.636Z","epss":{"score":0.00436,"percentile":0.39639,"date":"2026-12-01T12:00:22.000Z"}}