What’s Vulnerable › Vulnerabilities
CVE-2024-2206: SSRF Vulnerability in gradio-app/gradio
- Severity: medium (CVSS 6.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.4% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2024-03-27 · updated 2026-06-17
- Weakness: CWE-918
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.
Affected products
- gradio-app gradio: from 3.47.1 before 4.18.0 — fixed in 4.18.0
How to fix
Upgrade to a fixed version: gradio-app gradio 4.18.0. Check the vendor advisory for mitigations.
References
- https://github.com/gradio-app/gradio/commit/49d9c48537aa706bf72628e3640389470138bdc6
- https://huntr.com/bounties/2286c1ed-b889-45d6-adda-7014ea06d98e
- https://github.com/gradio-app/gradio/commit/49d9c48537aa706bf72628e3640389470138bdc6
- https://huntr.com/bounties/2286c1ed-b889-45d6-adda-7014ea06d98e
Get alerted when CVE-2024-2206 or the next vulnerability affects your stack