CVE-2024-34510: Gradio: credential leakage via Windows path encoding bug

GHSA-rvfh-h6c7-fc3c HIGH PoC AVAILABLE
Published May 5, 2024
CISO Take

Gradio deployments on Windows prior to 4.20 expose credentials—API keys, tokens, secrets—to unauthenticated remote attackers due to improper output encoding. Patch immediately to 4.20.0 or later; any Windows-based Gradio instance should be treated as potentially compromised. Rotate all secrets accessible to affected Gradio processes.

Risk Assessment

CVSS 7.5 High with AV:N/AC:L/PR:N/UI:N makes this trivially exploitable remotely with no authentication. The EPSS of 0.00092 suggests limited observed exploitation, but the zero-friction attack profile and the sensitivity of credentials in ML environments (LLM API keys, HuggingFace tokens, cloud credentials) elevate real-world risk well above base scores imply. Windows-hosted Gradio demos exposed to the internet are the highest-risk targets.

Affected Systems

Package Ecosystem Vulnerable Range Patched
gradio pip No patch
42.5K OpenSSF 5.5 679 dependents Pushed 2d ago 27% patched ~110d to patch Full package profile →
gradio pip < 4.20.0 4.20.0
42.5K OpenSSF 5.5 679 dependents Pushed 2d ago 27% patched ~110d to patch Full package profile →

Severity & Risk

CVSS 3.1
7.5 / 10
EPSS
0.1%
chance of exploitation in 30 days
Higher than 26% of all CVEs
Exploitation Status
Exploit Available
Exploitation: MEDIUM
Sophistication
Trivial
Exploitation Confidence
medium
Public PoC indexed (trickest/cve)
Composite signal derived from CISA KEV, CISA SSVC, EPSS, trickest/cve, and Nuclei templates.

Attack Surface

AV AC PR UI S C I A
AV Network
AC Low
PR None
UI None
S Unchanged
C High
I None
A None

Recommended Action

6 steps
  1. Patch: Upgrade Gradio to >= 4.20.0 immediately.

  2. Rotate credentials: Assume any secrets accessible to Gradio processes on Windows pre-4.20 are compromised—rotate API keys, tokens, and connection strings.

  3. Audit exposure: Identify all Windows-based Gradio instances, especially those internet-exposed or using tunneling tools.

  4. Detect: Review access logs for unexpected requests to Gradio endpoints that could indicate credential harvesting.

  5. Harden: Never store production secrets as environment variables on hosts running public-facing Gradio demos; use a secrets manager.

  6. Isolate: Run Gradio demos in isolated environments (containers, VMs) with least-privilege credentials scoped only to what the demo needs.

CISA SSVC Assessment

Decision Track
Exploitation none
Automatable No
Technical Impact partial

Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.

Classification

Compliance Impact

This CVE is relevant to:

EU AI Act
Art. 15 - Accuracy, robustness and cybersecurity of high-risk AI systems
ISO 42001
A.8.24 - Use of cryptography and secrets management A.9.4 - System and application access control
NIST AI RMF
GOVERN-1.7 - Processes for AI risk management include security considerations MANAGE-2.4 - Mechanisms for AI vulnerability management
OWASP LLM Top 10
LLM08 - Excessive Agency / Sensitive Information Disclosure

Frequently Asked Questions

What is CVE-2024-34510?

Gradio deployments on Windows prior to 4.20 expose credentials—API keys, tokens, secrets—to unauthenticated remote attackers due to improper output encoding. Patch immediately to 4.20.0 or later; any Windows-based Gradio instance should be treated as potentially compromised. Rotate all secrets accessible to affected Gradio processes.

Is CVE-2024-34510 actively exploited?

Proof-of-concept exploit code is publicly available for CVE-2024-34510, increasing the risk of exploitation.

How to fix CVE-2024-34510?

1. Patch: Upgrade Gradio to >= 4.20.0 immediately. 2. Rotate credentials: Assume any secrets accessible to Gradio processes on Windows pre-4.20 are compromised—rotate API keys, tokens, and connection strings. 3. Audit exposure: Identify all Windows-based Gradio instances, especially those internet-exposed or using tunneling tools. 4. Detect: Review access logs for unexpected requests to Gradio endpoints that could indicate credential harvesting. 5. Harden: Never store production secrets as environment variables on hosts running public-facing Gradio demos; use a secrets manager. 6. Isolate: Run Gradio demos in isolated environments (containers, VMs) with least-privilege credentials scoped only to what the demo needs.

What systems are affected by CVE-2024-34510?

This vulnerability affects the following AI/ML architecture patterns: ML demo platforms, model serving, agent frameworks, inference APIs.

What is the CVSS score for CVE-2024-34510?

CVE-2024-34510 has a CVSS v3.1 base score of 7.5 (HIGH). The EPSS exploitation probability is 0.09%.

Technical Details

NVD Description

Gradio before 4.20 allows credential leakage on Windows.

Exploitation Scenario

An adversary scans for public Gradio instances (via Shodan, Censys, or targeted recon on ML teams). They find a Windows-hosted Gradio deployment running a GPT-4 or Claude-powered demo. Due to CWE-116 (improper output encoding specific to Windows path handling), a crafted HTTP request causes Gradio to include improperly encoded credential material in its response—leaking the OpenAI API key, HuggingFace token, or cloud credentials embedded in the process environment. The attacker extracts the keys with no authentication, then uses them for LLM API abuse, unauthorized model access, or pivots to cloud infrastructure.

CVSS Vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Timeline

Published
May 5, 2024
Last Modified
June 17, 2025
First Seen
May 5, 2024

Related Vulnerabilities