gradio Server-Side Request Forgery vulnerability
High7.3CVE-2024-2206 · Published Mar 27, 2024 · updated Sep 10, 2026
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| gradio PyPI | < 4.18.0 | 4.18.0 |
Details and references
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.
- CVSS 3.0
- CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
- Severity from
- GitHub (reviewed advisory)
- Weakness
- CWE-918
- Also known as
- CVE-2024-2206, PYSEC-2026-1420
More Gradio advisories
All Gradio| Date | Advisory | Severity | Fixed in |
|---|---|---|---|
| Apr 162024 | gradio Server-Side Request Forgery vulnerability CVE-2024-1183Medium6.5fixed in 4.10.0 | Medium6.5 | 4.10.0 |
| Apr 162024 | gradio vulnerable to Path Traversal CVE-2024-1561High7.5fixed in 4.13.0 | High7.5 | 4.13.0 |
| Feb 222024 | Gradio apps vulnerable to timing attacks to guess password CVE-2024-1729Medium5.9fixed in 4.19.2 | Medium5.9 | 4.19.2 |
| May 52024 | Gradio's Component Server does not properly consider` _is_server_fn` for functions CVE-2024-34511Medium6.5fixed in 4.13.0 | Medium6.5 | 4.13.0 |
| May 52024 | Gradio allows credential leakage on Windows CVE-2024-34510High7.5fixed in 4.20.0 | High7.5 | 4.20.0 |
| Feb 62024 | Gradio Path Traversal vulnerability CVE-2024-0964High7.5fixed in 4.9.0 | High7.5 | 4.9.0 |