PT-2024-32447 · Gradio · Gradio

Ahpaleus

+1

·

Published

2024-10-10

·

Updated

2024-10-17

·

CVE-2024-47164

CVSS v4.0

6.9

Medium

VectorAV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
Name of the Vulnerable Software and Affected Versions Gradio versions prior to 5.0
Description This issue relates to the bypass of directory traversal checks within the is in or equal function. The function, intended to check if a file resides within a given directory, can be bypassed with certain payloads that manipulate file paths using .. (parent directory) sequences. Attackers could potentially access restricted files if they are able to exploit this flaw, although the difficulty is high. This primarily impacts users relying on Gradio’s blocklist or directory access validation, particularly when handling file uploads.
Recommendations To address this issue, upgrade to gradio>=5.0. As a temporary workaround, users can manually sanitize and normalize file paths in their Gradio deployment before passing them to the is in or equal function, ensuring that all file paths are properly resolved and absolute to mitigate the bypass vulnerabilities caused by the improper handling of .. sequences or malformed paths.

Exploit

Fix

Path traversal

Weakness Enumeration

Related Identifiers

CVE-2024-47164
GHSA-77XQ-6G77-H274
PYSEC-2024-213

Affected Products

Gradio