GitHub Advisoryadvisory · PyPI

GHSA-r364-m2j9-mf4h gradio Server-Side Request Forgery vulnerability

HIGH Published 2024-03-27 Modified 2024-04-16 Official page ↗
Aliases
CVE-2024-2206
Ecosystem
PyPI
Packages
gradio
Severity
High
CVSS vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
Weaknesses
CWE-918
Reviewed
2024-03-27

Affected packages

• PyPI gradio: < 4.18.0 → fixed in 4.18.0

Description

An SSRF vulnerability exists in the gradio-app/gradio due to insufficient validation of user-supplied URLs in the `/proxy` route. Attackers can exploit this vulnerability by manipulating the `self.replica_urls` set through the `X-Direct-Url` header in requests to the `/` and `/config` routes, allowing the addition of arbitrary URLs for proxying. This flaw enables unauthorized proxying of requests and potential access to internal endpoints within the Hugging Face space. The issue arises from the application's inadequate checking of safe URLs in the `build_proxy_request` function.

Related

Alias · CVE (1)

  • CVE-2024-2206 An SSRF vulnerability exists in the gradio-app/gradio due to insufficient validation of user-supplied URLs in the `/proxy` route. vulnerability

Weakness · CWE (1)

  • CWE-918 Server-Side Request Forgery weakness

References