NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · Gradio

CVE-2024-47871: Gradio uses insecure communication between the FRP client and server

highCVSS 4.0 8.6 · 3.1 8.1GHSA-279j-x4gx-hfrh

With share=True, Gradio before 5.0 does not enforce HTTPS on the connection between its FRP client and server. An attacker who can observe or sit in that path can read uploaded files and alter responses. Upgrade to gradio 5.0.0 or stop using share=True in production.

Published Oct 10, 2024 · Updated Jan 21, 2025 · Analysis Nov 1, 2026

What an attacker can do

The share=True option publishes a Gradio demo through a Fast Reverse Proxy (FRP) tunnel. The advisory says HTTPS is not enforced on the connection between the FRP client and server. Data therefore crosses the network in the clear.

An attacker who can see or intercept that traffic can read files uploaded to the Gradio server. They can also modify the responses or data sent between the client and the server. The CVSS vectors set the attack vector to adjacent network, which fits an on-path attacker such as someone on the same network. They show high confidentiality and integrity impact and no availability impact.

The advisory names users who share Gradio demos publicly over the internet with share=True without proper encryption. A demo that takes private documents, images or prompts from testers hands them to eavesdroppers. Tampered responses could also feed misleading output back to users.

Who is affected

gradio on pip, all versions below 5.0.0, for apps that launch with share=True. Check the version:

pip show gradio

Then search your code for share=True in launch() calls.

gradio

Ecosystem
PyPI
Affected
< 5.0.0
Fixed in
5.0.0
Check
pip show gradio

How to fix it

Upgrade to gradio 5.0.0 or later:

pip install --upgrade "gradio>=5"

The advisory's workaround, if you cannot upgrade: do not use share=True in production, and host the Gradio app on a server that has HTTPS enabled.

How to tell if you were hit

Search your launch scripts, notebooks and container entry points for share=True on Gradio versions below 5. The Gradio startup output prints a public share link when sharing is on. Treat files uploaded through shared demos on affected versions as possibly seen by a third party, and check for responses that differ from what the app produced.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Impact

What kind of vulnerability is it? Who is impacted?

This vulnerability involves insecure communication between the FRP (Fast Reverse Proxy) client and server when Gradio's share=True option is used. HTTPS is not enforced on the connection, allowing attackers to intercept and read files uploaded to the Gradio server, as well as modify responses or data sent between the client and server. This impacts users who are sharing Gradio demos publicly over the internet using share=True without proper encryption, exposing sensitive data to potential eavesdroppers.

Patches

Yes, please upgrade to gradio>=5 to address this issue.

Workarounds

Is there a way for users to fix or remediate the vulnerability without upgrading?

As a workaround, users can avoid using share=True in production environments and instead host their Gradio applications on servers with HTTPS enabled to ensure secure communication.

Credited to ahpaleus, Vasco-jofra.

Questions

Am I affected if I do not use share=True?

The advisory concerns the FRP connection that share=True uses, so apps hosted without it are not described as affected by this flaw.

What can an attacker do with CVE-2024-47871?

Read files uploaded to the Gradio server and modify responses or data sent between the client and server, because HTTPS is not enforced on the FRP connection.

How do I fix it without upgrading?

Avoid share=True in production and host the app on a server with HTTPS enabled. Upgrading to gradio 5.0.0 is the full fix.

References

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. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More Gradio vulnerabilities

All Gradio entries