Gradio file path access control can be bypassed on case-insensitive filesystems
A vulnerability in Gradio versions 5.6.0 and earlier allows attackers to bypass file access controls on case-insensitive filesystems by changing the case of blocked file paths. The flaw could expose sensitive configuration files, user data, and credentials.
What happened
Gradio's Access Control List (ACL) for file paths can be bypassed by altering the letter case of a blocked file or directory path due to a lack of case normalization in the file path validation logic.
The blocked_paths parameter does not account for case-insensitive operating systems such as Windows and macOS, enabling attackers to circumvent security restrictions and access sensitive files that should be protected.
Reported impact
Sensitive files or directories specified in blocked_paths can be accessed by attackers, potentially exposing critical files such as configuration files or user data.
The vulnerability could lead to a broader application or system compromise if sensitive files contain credentials or API keys.
Index analysis
The root cause is that the is_in_or_equal logic in Gradio's file path validation fails to handle case variations in paths on case-insensitive file systems.
The vulnerability affects Gradio versions 5.6.0 and earlier, and is relevant because Gradio is widely used for building web applications, particularly in machine learning and AI.
Governance controls
The vulnerability was disclosed through GitHub Security Advisory GHSA-j2jg-fq62-7c3h on January 14, 2025.
Classification
Sources and evidence
This record was researched and written by the Index, based on the following original reporting.