NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · Gradio

CVE-2024-47869: Gradio performs a non-constant-time comparison when comparing hashes

mediumCVSS 4.0 6.3 · 3.1 3.7GHSA-j757-pf57-f8r4

Gradio before 4.44.0 compares hashes for its analytics_dashboard in non-constant time. By timing many requests, an attacker can work out the correct hash byte by byte and gain access to the analytics dashboard. Exploitation is hard. Upgrade to gradio 4.44.0 or disable dashboard access.

Published Oct 10, 2024 · Updated Jan 21, 2025 · Analysis Nov 1, 2026

What an attacker can do

The analytics_dashboard function checks a key by comparing hash values. The comparison stops at the first byte that differs, so the response time depends on how many leading bytes match. An attacker who sends many requests with different keys and measures the response times can infer the correct hash one byte at a time.

The prize is unauthorized access to the analytics dashboard. The advisory says the attack works best when the attacker can query the system repeatedly. The CVSS vectors rate attack complexity as high, because network jitter hides small timing differences, and the impact as low confidentiality only, with a 3.1 score of 3.7.

The risk is limited to deployments that expose the analytics dashboard to untrusted networks. An attacker would see usage data the dashboard shows. It is a narrow issue, but easy to remove.

Who is affected

gradio on pip, all versions below 4.44.0, where the analytics dashboard is reachable by untrusted clients. Versions 4.44.0 and later are not listed as affected. Check the installed version:

pip show gradio

gradio

Ecosystem
PyPI
Affected
< 4.44.0
Fixed in
4.44.0
Check
pip show gradio

How to fix it

Upgrade to gradio 4.44 or later; the package data gives 4.44.0 as the patched version:

pip install --upgrade "gradio>=4.44"

The advisory's workarounds: patch analytics_dashboard to use a constant-time comparison function for hashes and other sensitive values, or disable access to the analytics dashboard.

How to tell if you were hit

A timing attack needs many requests. Look in access logs for a large run of requests to the analytics dashboard from one address, each with a different key and all failing. Rate limits or alerts on repeated failures there will catch it.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

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.

Credited to ahpaleus, Vasco-jofra.

Questions

Is CVE-2024-47869 easy to exploit?

No. The CVSS vectors rate attack complexity high. A timing attack needs many repeated requests and low network noise.

What does the attacker gain?

Unauthorized access to the Gradio analytics dashboard, after inferring the correct hash byte by byte.

Can I avoid the problem without upgrading?

Yes. Switch the comparison to a constant-time function, or disable access to the analytics dashboard.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More Gradio vulnerabilities

All Gradio entries