Gradio's dropdown component pre-process step does not limit the values to those in the dropdown list
Low5.3Published Oct 10, 2024 · updated Sep 10, 2026
### Impact **What kind of vulnerability is it? Who is impacted?** This vulnerability is a **data validation issue** in the Gradio `Dropdown` component's pre-processing step. Even if the `allow_custom_value` parameter is set to `False`, attackers can bypass this restriction by sending custom requests with arbitrary values, effectively breaking the developer’s intended input constraints. While this alone is not a severe vulnerability, it can lead to more critical security issues, particularly when paired with other vulnerabilities like file downloads from the user's machine. ### Patches Yes, this issue is addressed in `gradio>=5.0`. Please upgrade to the latest version to resolve the problem. ### Workarounds **Is there a way for users to fix or remediate the vulnerability without upgrading?** To mitigate the issue without upgrading, developers can add manual validation in their prediction function to check the received values against the allowed dropdown values before processing them.
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| gradio PyPI | < 5.0.0 | 5.0.0 |
Details and references
- CVSS 3.1
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
- Severity from
- GitHub (reviewed advisory)
More Gradio advisories
All Gradio| Date | Advisory | Severity | Fixed in |
|---|---|---|---|
| Oct 102024 | Gradio has an XSS on every Gradio server via upload of HTML files, JS files, or SVG files | Medium5.4 | 5.0.0 |
| Oct 102024 | Gradio uses insecure communication between the FRP client and server | High8.1 | 5.0.0 |
| Oct 102024 | Gradio has a race condition in update_root_in_config may redirect user traffic | High7.0 | 5.0.0 |
| Oct 102024 | Gradio performs a non-constant-time comparison when comparing hashes | Medium3.7 | 4.44.0 |
| Oct 102024 | Gradio has several components with post-process steps allow arbitrary file leaks | Medium5.3 | 5.0.0 |
| Oct 102024 | Gradio lacks integrity checking on the downloaded FRP client | High7.5 | 5.0.0 |