{"id":"CVE-2024-1561","published":"2024-04-16T00:00:15Z","modified":"2025-02-13T17:32:16Z","title":"Arbitrary Local File Read via Component Method Invocation in gradio-app/gradio","vendor":"gradio-app","product":"gradio-app/gradio","tier":"core","eol":null,"affectedVersions":[{"vendor":"gradio-app","product":"gradio-app/gradio","versions":[">= unspecified, < 4.13.0"]}],"description":{"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.","provenance":"source","from":"CVE.org"},"summary":null,"cvss":{"score":7.5,"severity":"HIGH","version":"3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.09314,"percentile":0.95369,"date":"2026-10-30","provenance":"source"},"kev":null,"vulncheckKev":{"dateAdded":"2024-09-18","exploitedFirstSeen":"2024-09-18","ransomware":false,"evidence":[{"url":"https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?day=2024-09-18&host_type=src&vulnerability=cve-2024-1561","date":"2024-09-18"},{"url":"https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?day=2024-09-19&host_type=src&vulnerability=cve-2024-1561","date":"2024-09-19"},{"url":"https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?day=2024-09-20&host_type=src&vulnerability=cve-2024-1561","date":"2024-09-20"},{"url":"https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?day=2024-09-21&host_type=src&vulnerability=cve-2024-1561","date":"2024-09-21"},{"url":"https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?day=2024-09-22&host_type=src&vulnerability=cve-2024-1561","date":"2024-09-22"},{"url":"https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?day=2024-09-23&host_type=src&vulnerability=cve-2024-1561","date":"2024-09-23"},{"url":"https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?day=2024-09-25&host_type=src&vulnerability=cve-2024-1561","date":"2024-09-25"},{"url":"https://bsky.app/profile/shadowserver.bsky.social/post/3l52cmd5l6j2u","date":"2024-09-26"},{"url":"https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?day=2024-09-26&host_type=src&vulnerability=cve-2024-1561","date":"2024-09-26"},{"url":"https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?day=2024-09-27&host_type=src&vulnerability=cve-2024-1561","date":"2024-09-27"}],"evidenceTotal":334,"provenance":"source"},"exploited":true,"otx":{"pulseCount":0,"pulses":[],"provenance":"machine"},"cwes":[{"id":"CWE-29","name":"Path Traversal: '..filename'"}],"references":[{"url":"https://huntr.com/bounties/4acf584e-2fe8-490e-878d-2d9bf2698338","tags":[]},{"url":"https://github.com/gradio-app/gradio/commit/24a583688046867ca8b8b02959c441818bdb34a2","tags":[]},{"url":"https://www.gradio.app/changelog#4-13-0","tags":[]}],"techniques":[],"reports":[],"affected":[{"ecosystem":"PyPI","package":"gradio","vulnerableRanges":["<4.13.0"],"patched":["4.13.0"],"from":["GHSA-g9cj-cfpp-4g2x","PYSEC-2026-1415"],"provenance":"source"}],"advisories":[{"id":"GHSA-g9cj-cfpp-4g2x","url":"https://github.com/advisories/GHSA-g9cj-cfpp-4g2x","severity":"HIGH","ecosystem":"PyPI","package":"gradio","vulnerableRanges":["<4.13.0"],"patched":["4.13.0"],"provenance":"source","from":"GHSA"}],"euvd":{"id":"EUVD-2024-1205","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2024-1205","exploited":false,"exploitedSince":null,"provenance":"source"},"exploits":[],"exploitSources":{"pocGithub":{"count":4,"skipped":0,"earliest":"2024-05-11","earliestUrl":"https://github.com/DiabloHTB/CVE-2024-1561","repos":[{"name":"DiabloHTB/CVE-2024-1561","url":"https://github.com/DiabloHTB/CVE-2024-1561","stars":4,"created":"2024-05-11"},{"name":"DiabloHTB/Nuclei-Template-CVE-2024-1561","url":"https://github.com/DiabloHTB/Nuclei-Template-CVE-2024-1561","stars":3,"created":"2024-05-12"},{"name":"WeiTao712/hdu-is-work1","url":"https://github.com/WeiTao712/hdu-is-work1","stars":0,"created":"2026-10-27"},{"name":"ImYangC7/hdu-is-lab1","url":"https://github.com/ImYangC7/hdu-is-lab1","stars":0,"created":"2026-10-27"}]},"nuclei":[{"id":"CVE-2024-1561","name":"Gradio 4.3-4.12 - Local File Read","severity":"high","path":"http/cves/2024/CVE-2024-1561.yaml","url":"https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2024/CVE-2024-1561.yaml"}],"first":{"date":"2024-05-11","source":"PoC-in-GitHub","url":"https://github.com/DiabloHTB/CVE-2024-1561"},"provenance":"source"},"exploitRefs":[],"flow":[],"timeline":[{"date":"2024-04-16","kind":"published","label":"Published (CVE.org)","url":"https://www.cve.org/CVERecord?id=CVE-2024-1561","provenance":"source"},{"date":"2024-05-11","kind":"exploit-public","label":"First public exploit: PoC-in-GitHub","url":"https://github.com/DiabloHTB/CVE-2024-1561","provenance":"source"},{"date":"2024-09-18","kind":"exploited-reported","label":"Exploitation first reported (VulnCheck KEV evidence)","url":"https://dashboard.shadowserver.org/statistics/honeypot/vulnerability/map/?day=2024-09-18&host_type=src&vulnerability=cve-2024-1561","provenance":"source"}],"speed":{"daysToPublicExploit":25,"firstExploitFrom":"PoC-in-GitHub","daysToKev":null},"priority":{"score":64.3,"factors":[{"name":"In a KEV catalog","points":35.0,"detail":"listed in VulnCheck KEV"},{"name":"Recent KEV listing","points":0.0,"detail":"added 773 days ago"},{"name":"Known ransomware use","points":0.0,"detail":"not known"},{"name":"EPSS percentile","points":19.07,"detail":"percentile 0.9537"},{"name":"Named in threat reports","points":0.0,"detail":"0 reports"},{"name":"Public exploit code","points":5.0,"detail":"4 PoC-in-GitHub repos; 1 nuclei template"},{"name":"Mentioned in OTX pulses","points":0.0,"detail":"0 pulses"},{"name":"CVSS severity","points":5.25,"detail":"base score 7.5"},{"name":"End-of-life product","points":0.0,"detail":"supported or unknown"}]},"lineage":{"packageHistory":[{"cve":"CVE-2024-0964","published":"2024-02-05","fixed":"4.9.0","kev":false},{"cve":"CVE-2024-1183","published":"2024-04-16","fixed":"4.10.0","kev":false},{"cve":"CVE-2023-51449","published":"2023-12-22","fixed":"4.11.0","kev":false,"link":{"from":"CVE-2023-51449","to":"CVE-2024-1561","relation":"successor","confidence":"high","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:gradio","fromFixed":"4.11.0","toFixed":"4.13.0","daysApart":116},{"kind":"same-code","provenance":"machine","files":["gradio/routes.py"],"commits":["https://github.com/gradio-app/gradio/commit/1b9d4234d6c25ef250d882c7b90e1f4039ed2d76","https://github.com/gradio-app/gradio/commit/7ba8c5da45b004edd12c0460be9222f5b5f5f055","https://github.com/gradio-app/gradio/commit/24a583688046867ca8b8b02959c441818bdb34a2"],"basis":"shared file"}]}},{"cve":"CVE-2024-1561","published":"2024-04-16","fixed":"4.13.0","kev":false},{"cve":"CVE-2023-6572","published":"2023-12-14","fixed":"4.14.0","kev":false},{"cve":"CVE-2024-2206","published":"2024-03-27","fixed":"4.18.0","kev":false},{"cve":"CVE-2024-1727","published":"2024-03-21","fixed":"4.19.2","kev":false}],"package":"PyPI:gradio"}}