CVE-2024-4941
Gradio JSON File Inclusion Vulnerability
Description
A local file inclusion vulnerability exists in the JSON component of gradio-app/gradio version 4.25. The vulnerability arises from improper input validation in the `postprocess()` function within `gradio/components/json_component.py`, where a user-controlled string is parsed as JSON. If the parsed JSON object contains a `path` key, the specified file is moved to a temporary directory, making it possible to retrieve it later via the `/file=..` endpoint. This issue is due to the `processing_utils.move_files_to_cache()` function traversing any object passed to it, looking for a dictionary with a `path` key, and then copying the specified file to a temporary directory. The vulnerability can be exploited by an attacker to read files on the remote system, posing a significant security risk.
INFO
Published Date :
June 6, 2024, 6:15 p.m.
Last Modified :
Nov. 21, 2024, 9:43 a.m.
Source :
[email protected]
Remotely Exploitable :
Yes !
Impact Score :
3.6
Exploitability Score :
3.9
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2024-4941
.
URL | Resource |
---|---|
https://github.com/gradio-app/gradio/commit/ee1e2942e0a1ae84a08a05464e41c8108a03fa9c | Patch |
https://huntr.com/bounties/39889ce1-298d-4568-aecd-7ae40c2ca58e | Exploit Third Party Advisory |
https://github.com/gradio-app/gradio/commit/ee1e2942e0a1ae84a08a05464e41c8108a03fa9c | Patch |
https://huntr.com/bounties/39889ce1-298d-4568-aecd-7ae40c2ca58e | Exploit Third Party Advisory |
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2024-4941
vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2024-4941
vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Modified by af854a3a-2127-422b-91ae-364da2661108
Nov. 21, 2024
Action Type Old Value New Value Added Reference https://github.com/gradio-app/gradio/commit/ee1e2942e0a1ae84a08a05464e41c8108a03fa9c Added Reference https://huntr.com/bounties/39889ce1-298d-4568-aecd-7ae40c2ca58e -
Initial Analysis by [email protected]
Oct. 09, 2024
Action Type Old Value New Value Added CVSS V3.1 NIST AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N Changed Reference Type https://github.com/gradio-app/gradio/commit/ee1e2942e0a1ae84a08a05464e41c8108a03fa9c No Types Assigned https://github.com/gradio-app/gradio/commit/ee1e2942e0a1ae84a08a05464e41c8108a03fa9c Patch Changed Reference Type https://huntr.com/bounties/39889ce1-298d-4568-aecd-7ae40c2ca58e No Types Assigned https://huntr.com/bounties/39889ce1-298d-4568-aecd-7ae40c2ca58e Exploit, Third Party Advisory Added CWE NIST NVD-CWE-noinfo Added CPE Configuration OR *cpe:2.3:a:gradio_project:gradio:*:*:*:*:*:python:*:* versions up to (excluding) 4.31.4 -
CVE Received by [email protected]
Jun. 06, 2024
Action Type Old Value New Value Added Description A local file inclusion vulnerability exists in the JSON component of gradio-app/gradio version 4.25. The vulnerability arises from improper input validation in the `postprocess()` function within `gradio/components/json_component.py`, where a user-controlled string is parsed as JSON. If the parsed JSON object contains a `path` key, the specified file is moved to a temporary directory, making it possible to retrieve it later via the `/file=..` endpoint. This issue is due to the `processing_utils.move_files_to_cache()` function traversing any object passed to it, looking for a dictionary with a `path` key, and then copying the specified file to a temporary directory. The vulnerability can be exploited by an attacker to read files on the remote system, posing a significant security risk. Added Reference huntr.dev https://huntr.com/bounties/39889ce1-298d-4568-aecd-7ae40c2ca58e [No types assigned] Added Reference huntr.dev https://github.com/gradio-app/gradio/commit/ee1e2942e0a1ae84a08a05464e41c8108a03fa9c [No types assigned] Added CWE huntr.dev CWE-20 Added CVSS V3 huntr.dev AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2024-4941
is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2024-4941
weaknesses.