CVE-2023-25823: Gradio Update Share Links To Use Vulnerability

MODERATE
Advisory Identifier: GHSA-3x5j-9vwr-8rr5
CVSS 5.4
CWE-798
Published
Advisory Summary

CVE-2023-25823 is a MODERATE (CVSS 5.4) update share links to use vulnerability (CWE-798: Use of Hard-coded Credentials) affecting Gradio libraries in the PyPI ecosystem. The issue involves update share links to use frp instead of ssh tunneling. Remediation is available by upgrading affected packages to version 3.13.1.

CVE-2023-25823 at a Glance

CVE Identifier CVE-2023-25823
GHSA Identifier GHSA-3x5j-9vwr-8rr5
Severity MODERATE
CVSS v3.1 Base Score 5.4
CWE Classification CWE-798: Use of Hard-coded Credentials
Affected Product Gradio
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 5.4

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:L).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix CVE-2023-25823

To remediate this vulnerability, upgrade all affected Gradio dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

gradio fixed: 3.13.1
pip install gradio>=3.13.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show gradio

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2023-25823, inspect your installed packages using pip:

pip show gradio

Analyze the terminal output to locate any version of Gradio in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.13.1), your application is affected.

Note: The pip show gradio command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-798: Use of Hard-coded Credentials, where the product contains hard-coded credentials, such as a password or cryptographic key. In Gradio, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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

CVE-2023-25823 Affected Gradio Versions

1 component(s)
Fixed Versions:
3.13.1
Product / Package Ecosystem Affected Versions Fixed Version
gradio
PyPI
< 3.13.1
3.13.1

References

Frequently Asked Questions

What is CVE-2023-25823?
CVE-2023-25823 is a security vulnerability in Gradio involving Update share links to use FRP instead of SSH tunneling under CWE-798: Use of Hard-coded Credentials.
Which Gradio versions are affected?
Affected versions include releases prior to 3.13.1 across affected packages: gradio.
What version fixes CVE-2023-25823?
Upgrading to 3.13.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is gradio affected?
Yes, gradio is affected in releases prior to 3.13.1. Upgrade your dependency to 3.13.1 or later.
What is the CVSS score of CVE-2023-25823?
CVE-2023-25823 has a CVSS v3.1 base score of 5.4 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:L.
What CWE is associated with CVE-2023-25823?
CVE-2023-25823 is classified under CWE-798: Use of Hard-coded Credentials (The product contains hard-coded credentials, such as a password or cryptographic key.).
How can I check PyPI dependencies for CVE-2023-25823?
Run the dependency tree command: 'pip show gradio'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-3x5j-9vwr-8rr5",
  "modified" : "2024-09-20T21:41:25Z",
  "published" : "2023-02-23T22:10:19Z",
  "aliases" : [ "CVE-2023-25823" ],
  "summary" : "Update share links to use FRP instead of SSH tunneling",
  "details" : "### Impact\nThis 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. \n\n### Patches\nThe problem has been patched. Ideally, users should upgrade to `gradio==3.19.1` or later where the FRP solution has been properly tested. \n\n### Credit\nCredit to Greg Sadetsky and Samuel Tremblay-Cossette for alerting the team",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:L"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:L/SA:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "gradio"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.13.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/gradio-app/gradio/security/advisories/GHSA-3x5j-9vwr-8rr5"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-25823"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/gradio-app/gradio"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/gradio/PYSEC-2023-16.yaml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-798" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-02-23T22:10:19Z",
    "nvd_published_at" : "2023-02-23T22:15:00Z"
  }
}