NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · Gradio

CVE-2024-47167: Gradio vulnerable to SSRF in the path parameter of /queue/join

mediumCVSS 4.0 6.9 · 3.1 7.2GHSA-576c-3j53-r9jj

Gradio before 5.0 has an SSRF flaw in the path parameter of /queue/join. Its async_save_url_to_cache function makes the server fetch URLs an attacker supplies, including internal addresses, and stores the response on disk. Apps with URL-fetching components such as Video are affected. Upgrade to gradio 5.0.0.

Published Oct 10, 2024 · Updated Jan 21, 2025 · Analysis Nov 1, 2026

What an attacker can do

A request to /queue/join can carry a URL in a path parameter. Gradio's async_save_url_to_cache function then fetches it from the server side. An attacker can aim it at internal servers or services on the local network, and may be able to pull data from them or trigger unwanted internal requests.

The response is also saved locally. The advisory says this makes it easier for an attacker to get potentially malicious files onto the server. The CVSS 3.1 vector has the scope changed, since the request reaches systems beyond Gradio, with low confidentiality and integrity impact. No privileges or user interaction are needed.

The advisory names deployments that use components that involve URL fetching, such as the Video component. Where Gradio runs inside a cloud network or next to internal admin tools, the practical risk is reaching services that were never meant to be public.

Who is affected

gradio on pip, all versions below 5.0.0. Apps that use components which fetch URLs, such as Video, are the ones named. Check the version:

pip show gradio

gradio

Ecosystem
PyPI
Affected
< 5.0.0
Fixed in
5.0.0
Check
pip show gradio

How to fix it

Upgrade to gradio 5.0 or later; the package data gives 5.0.0 as the patched version:

pip install --upgrade "gradio>=5"

The advisory's workarounds: disable URL-based inputs or limit them to trusted domains, add stricter URL validation such as an allow-list, and make sure local or internal addresses cannot be requested through /queue/join.

How to tell if you were hit

Look in request logs for calls to /queue/join where the path parameter holds an http or https URL, especially one that points to localhost, private IP ranges or cloud metadata addresses. Check egress logs from the Gradio host for requests to internal hosts. Inspect the Gradio cache directory for files that you did not upload.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Impact

What kind of vulnerability is it? Who is impacted?

This vulnerability relates to Server-Side Request Forgery (SSRF) in the /queue/join endpoint. Gradio’s async_save_url_to_cache function allows attackers to force the Gradio server to send HTTP requests to user-controlled URLs. This could enable attackers to target internal servers or services within a local network and possibly exfiltrate data or cause unwanted internal requests. Additionally, the content from these URLs is stored locally, making it easier for attackers to upload potentially malicious files to the server. This impacts users deploying Gradio servers that use components like the Video component which involve URL fetching.

Patches

Yes, please upgrade to gradio>=5 to address this issue.

Workarounds

Is there a way for users to fix or remediate the vulnerability without upgrading?

As a workaround, users can disable or heavily restrict URL-based inputs in their Gradio applications to trusted domains only. Additionally, implementing stricter URL validation (such as allowinglist-based validation) and ensuring that local or internal network addresses cannot be requested via the /queue/join endpoint can help mitigate the risk of SSRF attacks.

Credited to ahpaleus, Vasco-jofra.

Questions

How does this differ from the DownloadButton SSRF in CVE-2024-48052?

This one is in /queue/join and async_save_url_to_cache, fixed in gradio 5.0.0. CVE-2024-48052 is in gr.DownloadButton and save_url_to_cache, with no patched version listed.

Can it do more than send requests?

Yes. The fetched content is stored locally, which the advisory says makes it easier to put potentially malicious files on the server.

How can I reduce risk without upgrading?

Disable URL inputs or restrict them to trusted domains, use allow-list URL validation, and block internal addresses.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More Gradio vulnerabilities

All Gradio entries