{"id":"CVE-2024-1561","state":"PUBLISHED","title":"Arbitrary Local File Read via Component Method Invocation in gradio-app/gradio","description":"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.","publishedAt":"2024-04-16T00:00:15.906Z","updatedAt":"2025-02-13T17:32:16.918Z","severity":{"score":7.5,"label":"High","version":"3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","source":"@huntr_ai"},"assigner":"@huntr_ai","products":["gradio-app gradio-app/gradio"],"affected":[{"vendor":"gradio-app","product":"gradio-app/gradio","versions":[{"version":"unspecified","status":"affected","lessThan":"4.13.0","versionType":"custom"}]}],"references":["https://huntr.com/bounties/4acf584e-2fe8-490e-878d-2d9bf2698338","https://github.com/gradio-app/gradio/commit/24a583688046867ca8b8b02959c441818bdb34a2","https://www.gradio.app/changelog#4-13-0"],"weaknesses":["CWE-29"],"ingestedAt":"2026-10-29T20:06:59.846Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/1xxx/CVE-2024-1561.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2024-1561","state":"PUBLISHED","datePublished":"2024-04-16T00:00:15.906Z","dateUpdated":"2025-02-13T17:32:16.918Z","assignerShortName":"@huntr_ai","assignerOrgId":"c09c270a-b464-47c1-9133-acb35b22c19a","dateReserved":"2024-02-15T19:12:58.336Z"},"containers":{"cna":{"title":"Arbitrary Local File Read via Component Method Invocation in gradio-app/gradio","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"gradio-app","product":"gradio-app/gradio","versions":[{"version":"unspecified","status":"affected","lessThan":"4.13.0","versionType":"custom"}]}],"references":[{"url":"https://huntr.com/bounties/4acf584e-2fe8-490e-878d-2d9bf2698338"},{"url":"https://github.com/gradio-app/gradio/commit/24a583688046867ca8b8b02959c441818bdb34a2"},{"url":"https://www.gradio.app/changelog#4-13-0"}],"metrics":[{"cvssV3_0":{"version":"3.0","attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"NONE","confidentialityImpact":"HIGH","integrityImpact":"NONE","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","baseScore":7.5,"baseSeverity":"HIGH"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-29","type":"CWE","lang":"en","description":"CWE-29 Path Traversal: '\\..\\filename'"}]}],"providerMetadata":{"shortName":"@huntr_ai","orgId":"c09c270a-b464-47c1-9133-acb35b22c19a","dateUpdated":"2024-05-10T14:30:17.096Z"},"source":{"advisory":"4acf584e-2fe8-490e-878d-2d9bf2698338","discovery":"EXTERNAL"}},"adp":[{"title":"CISA ADP Vulnrichment","affected":[{"vendor":"gradio_project","product":"gradio","defaultStatus":"unknown","versions":[{"version":"4.12.0","status":"affected"}],"cpes":["cpe:2.3:a:gradio_project:gradio:-:*:*:*:*:python:*:*"]}],"metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2024-1561","role":"CISA Coordinator","options":[{"Exploitation":"poc"},{"Automatable":"yes"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-05-13T19:06:47.462340Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-06-04T18:01:14.302Z"}},{"title":"CVE Program Container","references":[{"url":"https://huntr.com/bounties/4acf584e-2fe8-490e-878d-2d9bf2698338","tags":["x_transferred"]},{"url":"https://github.com/gradio-app/gradio/commit/24a583688046867ca8b8b02959c441818bdb34a2","tags":["x_transferred"]},{"url":"https://www.gradio.app/changelog#4-13-0","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-01T18:40:21.441Z"}}]}}}