{"id":"CVE-2024-1561","summary":"Arbitrary Local File Read via Component Method Invocation in gradio-app/gradio","details":"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.","aliases":["GHSA-g9cj-cfpp-4g2x","PYSEC-2026-1415"],"modified":"2026-08-12T03:51:24.105959408Z","published":"2024-04-16T00:00:15.906Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/1xxx/CVE-2024-1561.json","cna_assigner":"@huntr_ai","cwe_ids":["CWE-29"]},"references":[{"type":"WEB","url":"https://huntr.com/bounties/4acf584e-2fe8-490e-878d-2d9bf2698338"},{"type":"WEB","url":"https://www.gradio.app/changelog#4-13-0"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/1xxx/CVE-2024-1561.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-1561"},{"type":"FIX","url":"https://github.com/gradio-app/gradio/commit/24a583688046867ca8b8b02959c441818bdb34a2"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/gradio-app/gradio","events":[{"introduced":"227221f88755240798ca2071bd1a0d165f5a82e7"},{"fixed":"3a0a11cf42fd8a5eae80599035ac618f8ff34404"},{"fixed":"24a583688046867ca8b8b02959c441818bdb34a2"}],"database_specific":{"cpe":"cpe:2.3:a:gradio_project:gradio:*:*:*:*:*:python:*:*","extracted_events":[{"introduced":"4.12.0"},{"fixed":"4.13.0"}],"source":["CPE_RANGE","REFERENCES"]}}],"versions":["gradio_client@0.8.0","gradio@4.12.0","@gradio/video@0.2.4","@gradio/uploadbutton@0.3.5","@gradio/upload@0.5.7","@gradio/model3d@0.4.12","@gradio/imageeditor@0.2.1","@gradio/image@0.5.4","@gradio/gallery@0.4.15","@gradio/file@0.4.4","@gradio/dataset@0.1.14","@gradio/dataframe@0.4.4","@gradio/code@0.3.4","@gradio/client@0.9.4","@gradio/chatbot@0.5.6","@gradio/button@0.2.14","@gradio/audio@0.6.4"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-1561.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"}]}