A vulnerability in Gradio's file upload handling allows an attacker to append many characters to a multipart boundary, causing the system to process each character and issue warnings. This can render Gradio inaccessible for extended periods, disrupting services.
The blocked_path feature in Gradio fails to block access to files when the path uses NTFS Alternate Data Streams syntax, so a user can read files that should be restricted. An attacker could use this to read blocked files on Windows.
A regular expression used to parse user input in the gr.Datetime component can take polynomial time to match certain crafted strings. An attacker could send a crafted HTTP request to consume 100% CPU and cause a denial of service.
The dataframe component of Gradio processes uploaded files with pandas.read_csv, which can accept compressed archives. An attacker can upload a crafted zip bomb to crash the server and cause a denial of service.
Gradio applications with a public link allowed users to access arbitrary files on the hosting machine by intercepting and modifying network requests. An attacker could read files outside the intended application directory.
The JSON component in gradio-app/gradio version 4.25 improperly validates user input in its postprocess function, allowing a user-controlled string to be parsed as JSON. If the parsed object contains a path key, the specified file is moved to a temporary directory and can later be retrieved via the /file=.. endpoint, enabling an attacker to read files on the remote system.
The `/queue/join` endpoint and `save_url_to_cache` function in gradio 4.21.0 accept a user-supplied `path` value and use it to make an HTTP request without sufficient validation. An attacker could send crafted requests to reach the local network or the AWS metadata endpoint, potentially compromising internal servers.
Gradio applications running locally could be accessed by third-party websites, allowing them to upload files to the local server. An attacker could host a malicious script that uploads a large file to a victim's local Gradio instance.
The `/component_server` endpoint in Gradio allows an attacker to invoke any method on a `Component` class with controlled arguments. By abusing the `move_resource_to_block_cache()` method, an attacker can copy arbitrary files to a temporary directory and retrieve them, enabling local file read.
The gradio application accepted a user-supplied file parameter in a GET request and fetched it server-side, letting an attacker probe internal network ports by observing whether the response contained a Location header or a 'File not allowed' error.
The gradio application's /proxy route fails to properly validate user-supplied URLs, and an attacker can add arbitrary URLs to the allowed proxy list via the X-Direct-Url header. This allows the attacker to proxy requests to internal endpoints within the Hugging Face space.
Gradio apps with password protection were vulnerable to timing attacks because string comparisons terminated early on mismatch, allowing attackers to guess passwords character by character. Without rate limiting, an attacker could brute-force millions of guesses to find the correct username and password.