CVE-2023-51449: Gradio: path traversal grants arbitrary file read
HIGH PoC AVAILABLE NUCLEI TEMPLATEAny Gradio app below version 4.11.0 with a public URL — Hugging Face Spaces or share=True demos — exposes the entire host filesystem to unauthenticated remote attackers. Upgrade to 4.11.0 immediately and rotate all secrets on affected hosts. Assume model weights, API keys, and credentials may already be exfiltrated.
Risk Assessment
High risk in practice. CVSS 7.5 understates operational exposure: zero authentication, trivial exploit, and the ML demo use case means thousands of instances run publicly by design. Hugging Face Spaces deployments are especially exposed. Sensitive assets at risk include .env files with LLM API keys, cloud credentials, proprietary model weights, and training data. No active KEV listing but the exploit pattern is well-known and automatable.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| gradio | pip | — | No patch |
Do you use gradio? You're affected.
Severity & Risk
Attack Surface
Recommended Action
5 steps-
Immediate: Upgrade gradio to >= 4.11.0 across all environments.
-
Audit: Inventory all Gradio instances — flag any running with share=True or deployed to Hugging Face Spaces on vulnerable versions.
-
Rotate: All secrets (API keys, cloud credentials, tokens) on hosts running vulnerable versions.
-
Detection: Grep web server / application logs for /file route requests containing traversal sequences: ../, %2e%2e, %252e%252e, encoded variants.
-
Harden: Place Gradio apps behind an authenticated reverse proxy in production; never expose share=True publicly for sensitive workloads.
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-2023-51449?
Any Gradio app below version 4.11.0 with a public URL — Hugging Face Spaces or share=True demos — exposes the entire host filesystem to unauthenticated remote attackers. Upgrade to 4.11.0 immediately and rotate all secrets on affected hosts. Assume model weights, API keys, and credentials may already be exfiltrated.
Is CVE-2023-51449 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2023-51449, increasing the risk of exploitation.
How to fix CVE-2023-51449?
1. Immediate: Upgrade gradio to >= 4.11.0 across all environments. 2. Audit: Inventory all Gradio instances — flag any running with share=True or deployed to Hugging Face Spaces on vulnerable versions. 3. Rotate: All secrets (API keys, cloud credentials, tokens) on hosts running vulnerable versions. 4. Detection: Grep web server / application logs for /file route requests containing traversal sequences: ../, %2e%2e, %252e%252e, encoded variants. 5. Harden: Place Gradio apps behind an authenticated reverse proxy in production; never expose share=True publicly for sensitive workloads.
What systems are affected by CVE-2023-51449?
This vulnerability affects the following AI/ML architecture patterns: ML demo platforms, model serving, inference endpoints, training pipelines.
What is the CVSS score for CVE-2023-51449?
CVE-2023-51449 has a CVSS v3.1 base score of 7.5 (HIGH). The EPSS exploitation probability is 81.49%.
Technical Details
NVD Description
Gradio is an open-source Python package that allows you to quickly build a demo or web application for your machine learning model, API, or any arbitary Python function. Versions of `gradio` prior to 4.11.0 contained a vulnerability in the `/file` route which made them susceptible to file traversal attacks in which an attacker could access arbitrary files on a machine running a Gradio app with a public URL (e.g. if the demo was created with `share=True`, or on Hugging Face Spaces) if they knew the path of files to look for. This issue has been patched in version 4.11.0.
Exploitation Scenario
Attacker mass-scans Hugging Face Spaces and public Gradio instances for version disclosure via response headers or HTML metadata. Against a vulnerable target, they craft GET requests to /file=../../.env or /file=../../root/.aws/credentials — no authentication required, low complexity. Automated scripts enumerate common sensitive paths in seconds. Exfiltrated API keys fund further attacks (LLM abuse, cloud resource theft). Attack is silent, leaves minimal forensic trace beyond HTTP access logs that operators rarely monitor.
Weaknesses (CWE)
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N References
- github.com/gradio-app/gradio/commit/1b9d4234d6c25ef250d882c7b90e1f4039ed2d76 Patch
- github.com/gradio-app/gradio/commit/7ba8c5da45b004edd12c0460be9222f5b5f5f055 Patch
- github.com/gradio-app/gradio/security/advisories/GHSA-6qm2-wpxq-7qh2 3rd Party
- github.com/J1ezds/Vulnerability-Wiki-page Exploit
- github.com/Threekiii/Awesome-POC Exploit
- github.com/g1san/Agents-for-Vulnerable-Dockers-and-related-Benchmarks Exploit
- github.com/google/tsunami-security-scanner-plugins Exploit
- github.com/nvn1729/advisories Exploit
Timeline
Scanner Template Available
A Nuclei vulnerability scanner template exists for this CVE. You can scan your infrastructure for this vulnerability immediately.
View template on GitHubnuclei -t http/cves/2023/CVE-2023-51449.yaml -u https://target.example.com Related Vulnerabilities
CVE-2024-47167 9.8 Gradio: unauthenticated SSRF in /queue/join, internal pivot
Same package: gradio CVE-2023-25823 9.8 Gradio: hardcoded SSH key leaks via share=True demos
Same package: gradio CVE-2024-39236 9.8 Gradio: code injection via component metadata (CVSS 9.8)
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