CVE-2025-5320: Gradio CORS Origin Validation Bypass Vulnerability
A vulnerability classified as problematic has been found in gradio-app gradio up to 5.29.1. This affects the function isvalidorigin of the component CORS Handler. The manipulation of the argument localhostaliases leads to origin validation error. It is possible to initiate the attack remotely. The complexity of an attack is rather high. The exploitability is told to be difficult.
Published May 29, 2025 · Updated Jun 5, 2025
Affected packages
gradio
- Ecosystem
- PyPI
- Affected
- >= 5.0.0, <= 5.29.1
- Fixed in
- No patched version yet
- Check
pip show gradio
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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 origin validation error. 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.
References
- https://nvd.nist.gov/vuln/detail/CVE-2025-5320
- https://gist.github.com/superboy-zjc/aa3dfa161d7b19d8a53ab4605792f2fe
- https://gist.github.com/superboy-zjc/aa3dfa161d7b19d8a53ab4605792f2fe#proof-of-concept-poc
- https://vuldb.com/?ctiid.310491
- https://vuldb.com/?id.310491
- https://vuldb.com/?submit.580250
- https://github.com/advisories/GHSA-wmjh-cpqj-4v6x
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Gradio vulnerabilities
All Gradio entriesCVE-2026-49119
Gradio FileExplorer preprocess path traversal allows files outside root_dir to reach callbacks
high7.5Jul 1, 2026CVE-2026-10783
Gradio: Audio cache key ignores metadata when saving numpy audio outputs
low2.5Jun 4, 2026CVE-2026-48545
Gradio contains a cookie injection vulnerability
high6.8May 27, 2026CVE-2026-27167
Gradio: Mocked OAuth Login Exposes Server Credentials and Uses Hardcoded Session Secret
lowMar 1, 2026CVE-2026-28414
Gradio is Vulnerable to Absolute Path Traversal on Windows with Python 3.13+
high7.5Mar 1, 2026CVE-2026-28415
Gradio has an Open Redirect in its OAuth Flow
medium4.3Mar 1, 2026
