CVE-2024-12217: Gradio Path Traversal Vulnerability
MODERATECVE-2024-12217 is a MODERATE (CVSS 5.3) path traversal vulnerability (CWE-41: Improper Resolution of Path Equivalence) affecting Gradio libraries in the PyPI ecosystem. The issue involves gradio path traversal vulnerability. Remediation is available in the latest vendor maintenance releases.
CVE-2024-12217 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N).
How to Fix CVE-2024-12217
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-2024-12217, 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-41: Improper Resolution of Path Equivalence, where the product is vulnerable to file system contents disclosure through path equivalence. path equivalence involves the use of special characters in file and directory names. the associated manipulations are intended to generate multiple names for the same object. 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-2024-12217 Affected Gradio Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
gradio
|
PyPI |
≤ 5.0.1
|
|
References
Frequently Asked Questions
What is CVE-2024-12217?
Which Gradio versions are affected?
What version fixes CVE-2024-12217?
Is gradio affected?
What is the CVSS score of CVE-2024-12217?
What CWE is associated with CVE-2024-12217?
How can I check PyPI dependencies for CVE-2024-12217?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-prpg-p95c-32fv",
"modified" : "2025-03-21T17:12:10Z",
"published" : "2025-03-20T12:32:42Z",
"aliases" : [ "CVE-2024-12217" ],
"summary" : "Gradio Path Traversal vulnerability",
"details" : "A vulnerability in the gradio-app/gradio repository, version git 67e4044, allows for path traversal on Windows OS. The implementation of the blocked_path functionality, which is intended to disallow users from reading certain files, is flawed. Specifically, while the application correctly blocks access to paths like 'C:/tmp/secret.txt', it fails to block access when using NTFS Alternate Data Streams (ADS) syntax, such as 'C:/tmp/secret.txt::$DATA'. This flaw can lead to unauthorized reading of blocked file paths.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "gradio"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "5.0.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-12217"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/gradio-app/gradio"
}, {
"type" : "WEB",
"url" : "https://github.com/gradio-app/gradio/blob/67e4044c9ca8358eceeb1fa72fa415df03397d20/gradio/utils.py#L1061-L1074"
}, {
"type" : "WEB",
"url" : "https://huntr.com/bounties/0439bf3d-cb38-43a5-8314-0fadf85cc5a0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22", "CWE-41" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-03-21T17:12:10Z",
"nvd_published_at" : "2025-03-20T10:15:27Z"
}
}