CVE-2026-49119: Gradio: path traversal in FileExplorer leaks files
HIGH PoC AVAILABLEGradio's FileExplorer component fails to properly validate user-supplied path segments before joining them to its configured root directory, letting an unauthenticated attacker escape that sandbox and read arbitrary files on the host — CVSS 7.5, confidentiality-only impact, zero privileges or user interaction required. Gradio (ml_ui) is widely used to expose ML demos, internal dataset browsers, and model-review dashboards directly to the internet, and any of them wiring up FileExplorer is affected; a successful read can leak environment secrets, LLM/API provider keys, SSH credentials, or model artifacts sitting on the same host. There's no EPSS score, no CISA KEV listing, and no public exploit or Nuclei template yet, but the fix is a one-line diff on a public GitHub commit, which makes reverse-engineering a working exploit trivial for anyone motivated. Patch to Gradio 6.16.0 or later immediately; until then, remove or gate FileExplorer behind authentication on any internet-facing app and audit logs for traversal sequences or absolute paths in FileExplorer requests.
What is the risk?
High severity (CVSS 7.5, AV:N/AC:L/PR:N/UI:N/C:H/I:N/A:N) — trivially exploitable by any unauthenticated network attacker with no user interaction, but scope is limited to confidentiality (arbitrary file read), with no integrity or availability impact. No EPSS data, no CISA KEV entry, and no known public PoC or Nuclei template currently exist, so active mass exploitation has not been observed. However, the vulnerability is simple to weaponize (classic CWE-22 os.path.join traversal) and a fix commit is already public, shortening the window before a PoC appears. Given Gradio's popularity for internet-facing ML demos (including HuggingFace Spaces-style deployments), the realistic exposure surface is broad even without a scored exploitation probability.
How does the attack unfold?
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| Gradio | pip | — | No patch |
Do you use Gradio? You're affected.
How severe is it?
What is the attack surface?
What should I do?
1 step-
Upgrade to Gradio 6.16.0 or later immediately — the fix is in the linked commit and PR. If immediate patching isn't possible: remove or disable the FileExplorer component from any internet-facing Gradio app, place the app behind authentication or a reverse proxy that blocks it from unauthenticated access, and add a WAF/reverse-proxy rule rejecting requests containing '../' sequences or absolute paths in FileExplorer parameters. Detection: review access logs for FileExplorer preprocess() calls with path traversal patterns or absolute-path segments, and inventory which internal or public Gradio deployments expose this component so they can be prioritized for patching.
What does CISA's SSVC say?
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2026-49119?
Gradio's FileExplorer component fails to properly validate user-supplied path segments before joining them to its configured root directory, letting an unauthenticated attacker escape that sandbox and read arbitrary files on the host — CVSS 7.5, confidentiality-only impact, zero privileges or user interaction required. Gradio (ml_ui) is widely used to expose ML demos, internal dataset browsers, and model-review dashboards directly to the internet, and any of them wiring up FileExplorer is affected; a successful read can leak environment secrets, LLM/API provider keys, SSH credentials, or model artifacts sitting on the same host. There's no EPSS score, no CISA KEV listing, and no public exploit or Nuclei template yet, but the fix is a one-line diff on a public GitHub commit, which makes reverse-engineering a working exploit trivial for anyone motivated. Patch to Gradio 6.16.0 or later immediately; until then, remove or gate FileExplorer behind authentication on any internet-facing app and audit logs for traversal sequences or absolute paths in FileExplorer requests.
Is CVE-2026-49119 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2026-49119, increasing the risk of exploitation.
How to fix CVE-2026-49119?
Upgrade to Gradio 6.16.0 or later immediately — the fix is in the linked commit and PR. If immediate patching isn't possible: remove or disable the FileExplorer component from any internet-facing Gradio app, place the app behind authentication or a reverse proxy that blocks it from unauthenticated access, and add a WAF/reverse-proxy rule rejecting requests containing '../' sequences or absolute paths in FileExplorer parameters. Detection: review access logs for FileExplorer preprocess() calls with path traversal patterns or absolute-path segments, and inventory which internal or public Gradio deployments expose this component so they can be prioritized for patching.
What systems are affected by CVE-2026-49119?
This vulnerability affects the following AI/ML architecture patterns: model serving UIs, ML demo / internal tooling dashboards, agent frameworks with Gradio front-ends.
What is the CVSS score for CVE-2026-49119?
CVE-2026-49119 has a CVSS v3.1 base score of 7.5 (HIGH). The EPSS exploitation probability is 0.69%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0037 Data from Local System AML.T0047 AI-Enabled Product or Service AML.T0049 Exploit Public-Facing Application Compliance Controls Affected
What are the technical details?
Original Advisory
Gradio before 6.16.0 contain a path traversal vulnerability in the FileExplorer component's preprocess() method that allows unauthenticated attackers to escape the configured root directory by supplying path segments containing directory traversal sequences or absolute paths. Attackers can provide crafted path segments that cause os.path.join to discard the root_dir prefix entirely, resulting in arbitrary file read or exposure of sensitive files outside the intended directory.
Exploitation Scenario
An attacker scans for internet-facing Gradio apps (e.g., via Shodan/Censys or public demo directories) that expose a FileExplorer component for browsing datasets or model files. Without authenticating, the attacker sends a crafted request to the component's preprocess() endpoint containing a directory-traversal sequence or an absolute path (e.g., '/etc/passwd' or '../../../../.env'), which causes os.path.join to discard the intended root_dir prefix. The server returns the contents of the requested file, and the attacker harvests environment secrets or API keys — such as an OpenAI or Anthropic key used by the app's backend LLM integration — then reuses those credentials to abuse the victim's paid AI API access or pivot further into the environment.
Weaknesses (CWE)
CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Primary
CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') CWE-22 — Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'): The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
- [Implementation] Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue." Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylis
- [Architecture and Design] For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.
Source: MITRE CWE corpus.
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-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-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-2024-4253 9.1 Gradio: CI/CD command injection enables secrets exfiltration
Same package: gradio