CVE-2023-34239: Gradio Gradio Vulnerable To Arbitrary File Vulnerability
MODERATECVE-2023-34239 is a MODERATE (CVSS 7.3) gradio vulnerable to arbitrary file vulnerability (CWE-20: Improper Input Validation) affecting Gradio libraries in the PyPI ecosystem. The issue involves gradio vulnerable to arbitrary file read and proxying of arbitrary urls. Remediation is available by upgrading affected packages to version 3.34.0.
CVE-2023-34239 at a Glance
Security Impact
CVSS: 7.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L).
How to Fix CVE-2023-34239
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.
pip install gradio>=3.34.0
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-34239, 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.34.0), 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-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. 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
CVE-2023-34239 Affected Gradio Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
gradio
|
PyPI |
< 3.34.0
|
3.34.0
|
References
Frequently Asked Questions
What is CVE-2023-34239?
Which Gradio versions are affected?
What version fixes CVE-2023-34239?
Is gradio affected?
What is the CVSS score of CVE-2023-34239?
What CWE is associated with CVE-2023-34239?
How can I check PyPI dependencies for CVE-2023-34239?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3qqg-pgqq-3695",
"modified" : "2024-09-20T21:19:30Z",
"published" : "2023-06-09T22:51:19Z",
"aliases" : [ "CVE-2023-34239" ],
"summary" : "Gradio vulnerable to arbitrary file read and proxying of arbitrary URLs",
"details" : "### Impact\nThere are two separate security vulnerabilities here: (1) a security vulnerability that allows users to read arbitrary files on the machines that are running shared Gradio apps (2) the ability of users to use machines that are sharing Gradio apps to proxy arbitrary URLs\n\n### Patches\nBoth problems have been solved, please upgrade `gradio` to `3.34.0` or higher\n\n### Workarounds\nNot possible to workaround except by taking down any shared Gradio apps\n\n### References\nRelevant PRs:\n* https://github.com/gradio-app/gradio/pull/4406\n* https://github.com/gradio-app/gradio/pull/4370",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "gradio"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.34.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/gradio-app/gradio/security/advisories/GHSA-3qqg-pgqq-3695"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-34239"
}, {
"type" : "WEB",
"url" : "https://github.com/gradio-app/gradio/pull/4370"
}, {
"type" : "WEB",
"url" : "https://github.com/gradio-app/gradio/pull/4406"
}, {
"type" : "WEB",
"url" : "https://github.com/gradio-app/gradio/commit/37967617bd97615fb6f3b44e7750c0e0be58479a"
}, {
"type" : "WEB",
"url" : "https://github.com/gradio-app/gradio/commit/37967617bd97615fb6f3b44e7750c0e0be58479a#diff-324a7165f5d5a8823a28b76f5653fa45f32c8144c82b2e528882c97c7eae534f"
}, {
"type" : "WEB",
"url" : "https://github.com/gradio-app/gradio/commit/cd64130d54e678525774bbb200ef9c7166fa1543"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/gradio-app/gradio"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/gradio/PYSEC-2023-90.yaml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-06-09T22:51:19Z",
"nvd_published_at" : "2023-06-08T00:15:09Z"
}
}