{"id":"CVE-2024-1561","aliases":["CVE-2024-1561","GHSA-g9cj-cfpp-4g2x","PYSEC-2026-1415"],"related":[],"kind":"vulnerability","state":"published","title":"Arbitrary Local File Read via Component Method Invocation in gradio-app/gradio","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"es","text":"Se descubrió un problema en gradio-app/gradio, donde el endpoint `/component_server` permite incorrectamente la invocación de cualquier método en una clase `Component` con argumentos controlados por el atacante. Específicamente, al explotar el método `move_resource_to_block_cache()` de la clase `Block`, un atacante puede copiar cualquier archivo en el sistema de archivos a un directorio temporal y posteriormente recuperarlo. Esta vulnerabilidad permite el acceso de lectura de archivos locales no autorizados, lo que representa un riesgo significativo, especialmente cuando la aplicación está expuesta a Internet a través de \"launch(share=True)\", lo que permite a atacantes remotos leer archivos en la máquina host. Además, las aplicaciones de gradio alojadas en `huggingface.co` también se ven afectadas, lo que podría provocar la exposición de información confidencial, como claves API y credenciales almacenadas en variables de entorno.","source":"nvd"}],"published":"2024-04-16T00:00:15.906Z","modified":"2026-09-10T03:50:11.297Z","severity":{"scorer":"@huntr_ai","scheme":"CVSS:3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"@huntr_ai","scheme":"CVSS:3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"}],"cwes":["CWE-29"],"affected":[{"ranges":[{"type":"custom","introduced":"unspecified","fixed":"4.13.0","status":"affected"}],"vendor":"gradio-app","product":"gradio-app/gradio","source":"cvelist"},{"ranges":[{"version":"4.12.0","status":"affected"}],"vendor":"gradio_project","product":"gradio","cpe":"cpe:2.3:a:gradio_project:gradio:-:*:*:*:*:python:*:*","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"4.13.0"}],"ecosystem":"PyPI","package":"gradio","purl":"pkg:pypi/gradio","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"4.12.0","fixed":"4.13.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.13.0"}],"ecosystem":"PyPI","package":"gradio","purl":"pkg:pypi/gradio","source":"pysec"}],"references":[{"url":"https://huntr.com/bounties/4acf584e-2fe8-490e-878d-2d9bf2698338","tags":["exploit","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/gradio-app/gradio/commit/24a583688046867ca8b8b02959c441818bdb34a2","tags":["fix","patch","web","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://www.gradio.app/changelog#4-13-0","tags":["release-notes","web","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-1561","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/gradio-app/gradio","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/gradio","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-g9cj-cfpp-4g2x","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"@huntr_ai","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2024-05-13T19:06:47.462Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-1561","url":"https://www.cve.org/CVERecord?id=CVE-2024-1561","licence":"CVE Terms of Use","modified":"2025-02-13T17:32:16.918Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-g9cj-cfpp-4g2x","url":"https://github.com/advisories/GHSA-g9cj-cfpp-4g2x","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:11.297Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-1561","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-1561","licence":"Public domain","modified":"2026-06-17T07:04:30.440Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-1415","url":"https://osv.dev/vulnerability/PYSEC-2026-1415","licence":"CC-BY-4.0","modified":"2026-07-07T17:47:40.282Z"}],"updatedAt":"2026-11-25T22:58:39.234Z","epss":{"score":0.09239,"percentile":0.95467,"date":"2026-12-02T12:00:21.000Z"}}