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

CVE-2023-25823: Update share links to use FRP instead of SSH tunneling

mediumCVSS 4.0 6.3 · 3.1 5.4GHSA-3x5j-9vwr-8rr5

Gradio versions older than 3.13.1 used SSH tunneling for share links (launch with share=True) and sent a private SSH key to any user who connected to the Gradio sharing machine. That let a stranger reach other people's shared demos. The fix moved share links to FRP. The advisory recommends 3.19.1 or later.

Published Feb 23, 2023 · Updated Sep 20, 2024 · Analysis Nov 2, 2026

What an attacker can do

When you create a Gradio app with share=True, the app opens a tunnel to Gradio's sharing service to get a public link. In the affected versions the tunnel used SSH, and the key was handed to any client that connected to that machine. With the key, an outside party could open tunnels into other users' shared demos.

From there, the advisory says other exploits are possible depending on how much access the app provides. A demo that can read local files, call internal APIs or run model code gives an attacker a path to the laptop or server hosting it. Together with file-read bugs in Gradio apps, such as CVE-2023-34239, this could be serious.

The flaw is hard-coded credentials (CWE-798). The CVSS vector has high attack complexity and a changed scope, which suits a bug in shared infrastructure. The credit goes to Greg Sadetsky and Samuel Tremblay-Cossette.

Who is affected

pip package gradio older than 3.13.1, for apps launched with share=True. Check:

pip show gradio

Apps run without share links do not use the tunnel. Note that the advisory's patched value is 3.13.1, but its text says to prefer 3.19.1 or later, where the FRP solution was properly tested.

gradio

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

How to fix it

Upgrade to gradio 3.13.1 at minimum. The advisory advises 3.19.1 or later, where the FRP solution has been tested:

pip install --upgrade "gradio>=3.19.1"

The fix replaced SSH tunneling with FRP for share links. Restart your apps after upgrading, since old share links ran over the old tunnel. Shut down any shared demo that ran on a vulnerable version and review what it had access to.

How to tell if you were hit

Find Gradio apps launched with share=True in your code and notebooks, and check their gradio versions. Review the app host for unexpected inbound sessions over the tunnel and for unfamiliar requests to the app's routes during the time share links were live.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Impact

This is a vulnerability which affects anyone using Gradio's share links (i.e. creating a Gradio app and then setting share=True) with Gradio versions older than 3.13.1. In these older versions of Gradio, a private SSH key is sent to any user that connects to the Gradio machine, which means that a user could access other users' shared Gradio demos. From there, other exploits are possible depending on the level of access/exposure the Gradio app provides.

Patches

The problem has been patched. Ideally, users should upgrade to gradio==3.19.1 or later where the FRP solution has been properly tested.

Credit

Credit to Greg Sadetsky and Samuel Tremblay-Cossette for alerting the team

Credited to gregsadetsky, samueltc.

Questions

Which Gradio versions are affected by CVE-2023-25823?

Versions older than 3.13.1 that use share links. The advisory recommends 3.19.1 or later for the tested FRP solution.

Am I affected if I never set share=True?

No. The flaw is in the share-link tunnel, so apps that do not use it are not exposed by this issue.

What did the leaked key allow?

Access to other users' shared Gradio demos. What an attacker could do next depends on the access the demo itself provides.

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