SSRF vulnerability in Gradio /queue/join endpoint (CVE-2024-47167)
Gradio's /queue/join endpoint contained a Server-Side Request Forgery vulnerability in versions prior to 5.0 that could allow attackers to send HTTP requests to internal networks or upload malicious files. The vulnerability was patched in Gradio 5.0.
What happened
A Server-Side Request Forgery (SSRF) vulnerability was discovered in the /queue/join endpoint of Gradio versions prior to 5.0. The vulnerability exists in the async_save_url_to_cache function, which allows attackers to supply user-controlled URLs that the server will fetch.
The vulnerability affects Gradio components like the Video component that involve URL fetching. Content from attacker-supplied URLs is stored locally on the server, potentially enabling upload of malicious files.
Reported impact
Attackers could force the Gradio server to send HTTP requests to internal servers or services within a local network, potentially leading to data exfiltration or unwanted internal requests. The vulnerability impacts users deploying Gradio servers with URL-fetching components.
Index analysis
The vulnerability was assigned CVE-2024-47167 and GHSA-576c-3j53-r9jj, with a severity rating of High. Gradio version 5.0 and later contain patches for this issue.
Governance controls
As a workaround, users can disable or restrict URL-based inputs to trusted domains only, implement allowlist-based URL validation, and ensure local or internal network addresses cannot be requested via the /queue/join endpoint.
Classification
Sources and evidence
This record was researched and written by the Index, based on the following original reporting.