Gradio < 4.13.0 Local File Access

high Nessus Plugin ID 213709

Synopsis

The remote host is affected by a vulnerability.

Description

The version of Gradio installed on the remote host is prior to 4.13.0. It is, therefore, affected by a local file access vulnerability. An issue was discovered in gradio-app/gradio, where the `/component_server` endpoint improperly allows the invocation of any method on a `Component` class with attacker-controlled arguments. Specifically, by exploiting the `move_resource_to_block_cache()` method of the `Block` class, an attacker can copy any file on the filesystem to a temporary directory and subsequently retrieve it. This vulnerability enables unauthorized local file read access, posing a significant risk especially when the application is exposed to the internet via `launch(share=True)`, thereby allowing remote attackers to read files on the host machine. Furthermore, gradio apps hosted on `huggingface.co` are also affected, potentially leading to the exposure of sensitive information such as API keys and credentials stored in environment variables.

Note that Nessus has not tested for this issue but has instead relied only on the application's self-reported version number.

Solution

Upgrade to Gradio version 4.13.0 or later.

See Also

https://www.gradio.app/changelog#4-13-0

https://huntr.com/bounties/4acf584e-2fe8-490e-878d-2d9bf2698338

http://www.nessus.org/u?50d1c6e9

Plugin Details

Severity: High

ID: 213709

File Name: gradio_CVE-2024-1561.nasl

Version: 1.1

Type: local

Published: 1/10/2025

Updated: 1/10/2025

Supported Sensors: Nessus

Risk Information

VPR

Risk Factor: Low

Score: 3.6

CVSS v2

Risk Factor: High

Base Score: 7.8

Vector: CVSS2#AV:N/AC:L/Au:N/C:C/I:N/A:N

CVSS Score Source: CVE-2024-1561

CVSS v3

Risk Factor: High

Base Score: 7.5

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

Vulnerability Information

CPE: cpe:/a:gradio-app:gradio

Required KB Items: installed_sw/Gradio

Patch Publication Date: 4/16/2024

Vulnerability Publication Date: 4/16/2024

Reference Information

CVE: CVE-2024-1561

CWE: CWE-29