CVE-2024-4941

7.5 HIGH
Published: June 06, 2024 Modified: October 15, 2025

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.

AI Explanation

Get an AI-powered plain-language explanation of this vulnerability and remediation steps.

Login to generate AI explanation

CVSS v3.x Details

0.0 Low Medium High Critical 10.0
Vector String
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

References to Advisories, Solutions, and Tools

Patch Vendor Advisory Exploit Third Party Advisory
https://huntr.com/bounties/39889ce1-298d-4568-aecd-7ae40c2ca58e
Source: security@huntr.dev
Exploit Third Party Advisory
https://huntr.com/bounties/39889ce1-298d-4568-aecd-7ae40c2ca58e
Source: af854a3a-2127-422b-91ae-364da2661108
Exploit Third Party Advisory

4 reference(s) from NVD

Quick Stats

CVSS v3 Score
7.5 / 10.0
EPSS (Exploit Probability)
0.8%
73th percentile
Exploitation Status
Not in CISA KEV

Weaknesses (CWE)

Affected Vendors

gradio_project