Gradio performs a non-constant-time comparison when comparing hashes
Medium3.7CVE-2024-47869 · Published Oct 10, 2024 · updated Jan 21, 2025
### Impact **What kind of vulnerability is it? Who is impacted?** This vulnerability involves a **timing attack** in the way Gradio compares hashes for the `analytics_dashboard` function. Since the comparison is not done in constant time, an attacker could exploit this by measuring the response time of different requests to infer the correct hash byte-by-byte. This can lead to unauthorized access to the analytics dashboard, especially if the attacker can repeatedly query the system with different keys. ### Patches Yes, please upgrade to `gradio>4.44` to mitigate this issue. ### Workarounds **Is there a way for users to fix or remediate the vulnerability without upgrading?** To mitigate the risk before applying the patch, developers can manually patch the `analytics_dashboard` dashboard to use a **constant-time comparison** function for comparing sensitive values, such as hashes. Alternatively, access to the analytics dashboard can be disabled.
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| gradio PyPI | < 4.44.0 | 4.44.0 |
Details and references
More Gradio advisories
All Gradio| Date | Advisory | Severity | Fixed in |
|---|---|---|---|
| Oct 102024 | Gradio's dropdown component pre-process step does not limit the values to those in the dropdown list | Low5.3 | 5.0.0 |
| 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 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 |