CVE-2025-5320 gradio-app gradio CORS is_valid_origin privilege escalation
Attackers can bypass CORS restrictions in Gradio via localhost alias manipulation, potentially leading to privilege escalation.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2025-5320?
CVE-2025-5320 is a medium-severity vulnerability in gradio-app gradio, published on 29 May 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
A vulnerability classified as problematic has been found in gradio-app gradio up to 5.29.1. This affects the function is_valid_origin of the component CORS Handler. The manipulation of the argument localhost_aliases leads to erweiterte Rechte. It is possible to initiate the attack remotely. The complexity of an attack is rather high. The exploitability is told to be difficult. The exploit has been disclosed to the public and may be used. The vendor was contacted early about this disclosure but did not respond in any way.
Which versions are affected by CVE-2025-5320?
3 open source packages ship an affected version, including gradio.
| Package | Affected | Fixed in |
|---|---|---|
gradio PyPI | From 5.0.0 to 5.29.1 | None |
gradio PyPI | From 5.0.0 to 5.29.1 | None |
gradio PyPI | From 5.0.0 to 5.29.1 | None |
How do I fix CVE-2025-5320?
No fix has been published for CVE-2025-5320 yet. Limit exposure of the affected software until one is available.
Is CVE-2025-5320 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-5320 exists.
Sources
Also known as GHSA-wmjh-cpqj-4v6x, PYSEC-2026-1423.