7.5
HIGH CVSS 3.1
CVE-2024-4941
Local File Inclusion in JSON component in gradio-app/gradio
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 :

Oct. 15, 2025, 1:15 p.m.

Remotely Exploit :

Yes !
Affected Products

The following products are affected by CVE-2024-4941 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Gradio_project gradio
CVSS Scores
The Common Vulnerability Scoring System is a standardized framework for assessing the severity of vulnerabilities in software and systems. We collect and displays CVSS scores from various sources for each CVE.
Score Version Severity Vector Exploitability Score Impact Score Source
CVSS 3.0 HIGH [email protected]
CVSS 3.1 HIGH [email protected]
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
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:

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 [email protected]

    Oct. 15, 2025

    Action Type Old Value New Value
    Added CWE CWE-22
    Removed CWE CWE-20
  • 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
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
Vulnerability Scoring Details
Base CVSS Score: 7.5
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality Impact
Integrity Impact
Availability Impact
Base CVSS Score: 7.5
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality Impact
Integrity Impact
Availability Impact