CVE-2024-47165 CORS origin validation accepts the null origin in Gradio

Medium 6.9 Published Updated

Attackers can bypass CORS restrictions using null origins to steal authentication tokens or files from locally deployed Gradio servers.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2024-47165?

CVE-2024-47165 is a medium-severity vulnerability in Gradio Project Gradio, published on 10 Oct 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Gradio is an open-source Python package designed for quick prototyping. This vulnerability relates to **CORS origin validation accepting a null origin**. When a Gradio server is deployed locally, the `localhost_aliases` variable includes "null" as a valid origin. This allows attackers to make unauthorized requests from sandboxed iframes or other sources with a null origin, potentially leading to data theft, such as user authentication tokens or uploaded files. This impacts users running Gradio locally, especially those using basic authentication. Users are advised to upgrade to `gradio>=5.0` to address this issue. As a workaround, users can manually modify the `localhost_aliases` list in their local Gradio deployment to exclude "null" as a valid origin. By removing this value, the Gradio server will no longer accept requests from sandboxed iframes or sources with a null origin, mitigating the potential for exploitation.

Weakness: CWE-285

Which versions are affected by CVE-2024-47165?

3 open source packages ship an affected version, including gradio. It affects 1 product.

PackageAffectedFixed in
gradio PyPIAll versions5.0.0
gradio PyPIAll versions5.0.0
gradio PyPIAll versions5.0.0

Products include Gradio Project Gradio.

How do I fix CVE-2024-47165?

Upgrade gradio to 5.0.0 or later.

Is CVE-2024-47165 being exploited?

There is no known exploitation of CVE-2024-47165 in the wild and no public exploit code.

All Gradio Project Gradio vulnerabilities

Sources

Also known as GHSA-89v2-pqfv-c5r9, PYSEC-2024-214.

Is CVE-2024-47165 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free