CVE-2024-1729: Gradio apps vulnerable to timing attacks to guess password
5.9
CVSS Score
3.0
Basic Information
CVE ID
GHSA ID
EPSS Score
0.19063%
CWE
Published
2/22/2024
Updated
4/8/2024
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| gradio | pip | < 4.19.2 | 4.19.2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from direct password comparison using 'app.auth[username] == password' in the login route. This insecure comparison leaks timing information because Python's string comparison short-circuits on first mismatch. The commit patched this by replacing it with hmac.compare_digest in a new compare_passwords_securely function. The routes.py modification in the diff clearly shows the vulnerable comparison was in the login handler.