logo

CVE-2024-4941 gradio

Package

Manager: pip
Name: gradio
Vulnerable Version: >=0 <4.31.3

Severity

Level: High

CVSS v3.1: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

EPSS: 0.00301 pctl0.52881

Details

Local file inclusion in gradio A local file inclusion vulnerability exists in the JSON component of gradio-app/gradio and was discovered in 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.

Metadata

Created: 2024-06-06T18:30:58Z
Modified: 2025-01-21T18:00:58Z
Source: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/06/GHSA-6v6g-j5fq-hpvw/GHSA-6v6g-j5fq-hpvw.json
CWE IDs: ["CWE-20", "CWE-22"]
Alternative ID: GHSA-6v6g-j5fq-hpvw
Finding: F063
Auto approve: 1