Gradio < 4.18.0 Vulnerability - CVE-2024-2206

high Nessus Plugin ID 213707

Synopsis

The remote host is affected by a vulnerability.

Description

The version of Gradio installed on the remote host is prior to 4.18.0. It is, therefore, affected by an SSRF vulnerability exists in the gradio-app/gradio due to insufficient validation of user-supplied URLs in the `/proxy` route. Attackers can exploit this vulnerability by manipulating the `self.replica_urls` set through the `X-Direct-Url` header in requests to the `/` and `/config` routes, allowing the addition of arbitrary URLs for proxying. This flaw enables unauthorized proxying of requests and potential access to internal endpoints within the Hugging Face space. The issue arises from the application's inadequate checking of safe URLs in the `build_proxy_request` function.

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.18.0 or later.

See Also

http://www.nessus.org/u?5e786999

https://huntr.com/bounties/2286c1ed-b889-45d6-adda-7014ea06d98e

http://www.nessus.org/u?06ba0bef

Plugin Details

Severity: High

ID: 213707

File Name: gradio_CVE-2024-2206.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.4

CVSS v2

Risk Factor: High

Base Score: 7.5

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

CVSS Score Source: CVE-2024-2206

CVSS v3

Risk Factor: High

Base Score: 7.3

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

Vulnerability Information

CPE: cpe:/a:gradio_project:gradio

Required KB Items: installed_sw/Gradio

Patch Publication Date: 3/27/2024

Vulnerability Publication Date: 3/27/2024

Reference Information

CVE: CVE-2024-2206

CWE: CWE-918