Server-Side Request Forgery in gradio
The `/queue/join` endpoint and `save_url_to_cache` function in gradio 4.21.0 accept a user-supplied `path` value and use it to make an HTTP request without sufficient validation. An attacker could send crafted requests to reach the local network or the AWS metadata endpoint, potentially compromising internal servers.
gradio-app/gradio
Originally disclosed on huntr
A Server-Side Request Forgery (SSRF) vulnerability exists in the gradio-app/gradio and was discovered in version 4.21.0, specifically within the /queue/join endpoint and the save_url_to_cache function. The vulnerability arises when the path value, obtained from the user and expected to be a URL, is used to make an HTTP request without sufficient validation checks. This flaw allows an attacker to send crafted requests that could lead to unauthorized access to the local network or the AWS metadata endpoint, thereby compromising the security of internal servers.
From the GitHub Advisory Database (GHSA-973g-55hp-3frw, CC BY 4.0).
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the application failed to validate or restrict the user-supplied URL before using it in an outbound HTTP request.
Impact
An attacker could use crafted requests to gain unauthorised access to the local network or the AWS metadata endpoint, potentially compromising internal servers.
What the attacker needed
Access to the /queue/join endpoint
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A server-side request forgery (SSRF) happens when a web application takes a web address from a user and fetches it on the server's behalf without checking where it points. Here, the gradio application fetched any address supplied through its queue endpoint, so an attacker could make the server contact machines on its private network or a cloud metadata service that holds credentials. This can expose internal services that are not meant to be reachable from the internet.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.