PYSEC-2024-199: Non-constant-time comparison when comparing hashes in Gradio

Published Oct 10, 2024
·
Updated

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.

Affected Software

1 affected component
pypi/gradio<=4.44

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade gradio to a version that resolves this vulnerability.

    Fixed in 4.44
  2. Configuration

    Disable access to the analytics dashboard.

    Gradio analytics dashboard analytics_dashboard = disabled
  3. Compensating control

    Manually patch the analytics_dashboard function to compare sensitive values such as hashes using a constant-time comparison function before applying the patch.

Event History

Oct 10, 2024
CVE Published
via OSV·10:16 PM
Data Sourced
via OSV·10:16 PM
DescriptionSeverityWeakness

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203