{"id":"CVE-2024-1561","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"],"modified":"2026-03-13T07:51:38.963090Z","published":"2024-04-16T00:15:08.887Z","references":[{"type":"ADVISORY","url":"https://www.gradio.app/changelog#4-13-0"},{"type":"FIX","url":"https://github.com/gradio-app/gradio/commit/24a583688046867ca8b8b02959c441818bdb34a2"},{"type":"EVIDENCE","url":"https://huntr.com/bounties/4acf584e-2fe8-490e-878d-2d9bf2698338"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/gradio-app/gradio","events":[{"introduced":"227221f88755240798ca2071bd1a0d165f5a82e7"},{"fixed":"3a0a11cf42fd8a5eae80599035ac618f8ff34404"},{"fixed":"24a583688046867ca8b8b02959c441818bdb34a2"}],"database_specific":{"versions":[{"introduced":"4.12.0"},{"fixed":"4.13.0"}]}}],"versions":["@gradio/audio@0.6.4","@gradio/button@0.2.14","@gradio/chatbot@0.5.6","@gradio/client@0.9.4","@gradio/code@0.3.4","@gradio/dataframe@0.4.4","@gradio/dataset@0.1.14","@gradio/file@0.4.4","@gradio/gallery@0.4.15","@gradio/image@0.5.4","@gradio/imageeditor@0.2.1","@gradio/model3d@0.4.12","@gradio/upload@0.5.7","@gradio/uploadbutton@0.3.5","@gradio/video@0.2.4","gradio@4.12.0","gradio_client@0.8.0"],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-1561.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"}]}