CVE-2024-47869: Non-constant-time comparison when comparing hashes in Gradio
Impact What kind of vulnerability is it? Who is impacted?
This vulnerability involves a timing attack in the way Gradio compares hashes for the analyticsdashboard 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 analyticsdashboard dashboard to use a constant-time comparison function for comparing sensitive values, such as hashes. Alternatively, access to the analytics dashboard can be disabled.
Other sources
Gradio is an open-source Python package designed for quick prototyping. This vulnerability involves a timing attack in the way Gradio compares hashes for the analyticsdashboard 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. Users are advised to upgrade to gradio>4.44 to mitigate this issue. To mitigate the risk before applying the patch, developers can manually patch the analyticsdashboard dashboard to use a constant-time comparison function for comparing sensitive values, such as hashes. Alternatively, access to the analytics dashboard can be disabled.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
pip/gradioto a version that resolves this vulnerability.Fixed in 4.44.0 - Upgrade
Upgrade
gradioto a version that resolves this vulnerability.Fixed in >4.44 - Configuration
Manually patch the analytics_dashboard function to use a constant-time comparison when comparing sensitive values such as hashes.
Gradio analytics_dashboard hash comparison = constant-time comparison - Configuration
Disable access to the analytics dashboard as an alternative mitigation.
Gradio analytics dashboard analytics_dashboard = disabled
Event History
Frequently Asked Questions
What is the severity of CVE-2024-47869?
CVE-2024-47869 is classified as a high-severity vulnerability due to the potential for timing attacks.
How do I fix CVE-2024-47869?
To mitigate CVE-2024-47869, upgrade to Gradio version 4.44.0 or later.
Who is impacted by CVE-2024-47869?
CVE-2024-47869 affects users of Gradio versions prior to 4.44.0.
What type of vulnerability is CVE-2024-47869?
CVE-2024-47869 is a timing attack vulnerability related to hash comparison in the analytics_dashboard function.
Is CVE-2024-47869 exploitative in nature?
Yes, CVE-2024-47869 can be exploited by attackers to deduce information from timing differences in hash comparisons.