CVE-2023-41626: Gradio Gradio Arbitrary File Upload Vulnerability Vulnerability
MODERATECVE-2023-41626 is a MODERATE (CVSS 4.8) gradio arbitrary file upload vulnerability vulnerability (CWE-434: Unrestricted Upload of File with Dangerous Type) affecting Gradio libraries in the PyPI ecosystem. The issue involves gradio arbitrary file upload vulnerability. Remediation is available in the latest vendor maintenance releases.
CVE-2023-41626 at a Glance
Security Impact
CVSS: 4.8
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:U/C:L/I:L/A:N).
How to Fix CVE-2023-41626
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>=Latest secure release
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-41626, 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 the patched release), 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-434: Unrestricted Upload of File with Dangerous Type, where the product allows the upload or transfer of dangerous file types that are automatically processed within its environment. 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-41626 Affected Gradio Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
gradio
|
PyPI |
≤ 3.27.0
|
|
References
Frequently Asked Questions
What is CVE-2023-41626?
Which Gradio versions are affected?
What version fixes CVE-2023-41626?
Is gradio affected?
What is the CVSS score of CVE-2023-41626?
What CWE is associated with CVE-2023-41626?
How can I check PyPI dependencies for CVE-2023-41626?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-v4q9-qgqf-7jwp",
"modified" : "2023-09-21T17:12:02Z",
"published" : "2023-09-16T00:30:30Z",
"aliases" : [ "CVE-2023-41626" ],
"summary" : "Gradio arbitrary file upload vulnerability",
"details" : "Gradio v3.27.0 was discovered to contain an arbitrary file upload vulnerability via the `/upload` interface.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "gradio"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "3.27.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-41626"
}, {
"type" : "WEB",
"url" : "https://gist.github.com/impose1/590472eb0544ef1ec36c8a5a40122adb"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/gradio-app/gradio"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-434" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-09-21T17:12:02Z",
"nvd_published_at" : "2023-09-15T23:15:07Z"
}
}