CVE-2024-34510: Gradio: credential leakage via Windows path encoding bug
GHSA-rvfh-h6c7-fc3c HIGH PoC AVAILABLEGradio 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
Severity & Risk
Attack Surface
Recommended Action
6 steps-
Patch: Upgrade Gradio to >= 4.20.0 immediately.
-
Rotate credentials: Assume any secrets accessible to Gradio processes on Windows pre-4.20 are compromised—rotate API keys, tokens, and connection strings.
-
Audit exposure: Identify all Windows-based Gradio instances, especially those internet-exposed or using tunneling tools.
-
Detect: Review access logs for unexpected requests to Gradio endpoints that could indicate credential harvesting.
-
Harden: Never store production secrets as environment variables on hosts running public-facing Gradio demos; use a secrets manager.
-
Isolate: Run Gradio demos in isolated environments (containers, VMs) with least-privilege credentials scoped only to what the demo needs.
CISA SSVC Assessment
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
Classification
Compliance Impact
This CVE is relevant to:
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.
Weaknesses (CWE)
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N References
Timeline
Related Vulnerabilities
CVE-2024-39236 9.8 Gradio: code injection via component metadata (CVSS 9.8)
Same package: gradio CVE-2023-25823 9.8 Gradio: hardcoded SSH key leaks via share=True demos
Same package: gradio CVE-2024-47167 9.8 Gradio: unauthenticated SSRF in /queue/join, internal pivot
Same package: gradio CVE-2024-0964 9.4 Gradio: unauthenticated LFI exposes full server filesystem
Same package: gradio CVE-2023-34239 9.1 Gradio: path traversal + SSRF exposes model files & infra
Same package: gradio
AI Threat Alert