CVE-2026-49119: Gradio: path traversal in FileExplorer leaks files

HIGH PoC AVAILABLE
Published July 1, 2026
CISO Take

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.

Sources: NVD GitHub Advisory ATLAS vulncheck.com

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?

Recon
Attacker identifies an internet-facing Gradio app that exposes a FileExplorer component.
AML.T0006
Exploitation
Attacker sends a crafted FileExplorer request with a traversal sequence or absolute path that bypasses the root_dir restriction.
AML.T0049
Data exfiltration
Attacker reads arbitrary files on the host, including secrets, API keys, and source code.
AML.T0037
Impact
Leaked credentials or data are reused to abuse connected AI APIs or pivot further into the environment.
AML.T0025

What systems are affected?

Package Ecosystem Vulnerable Range Patched
Gradio pip No patch
43.4K OpenSSF 5.7 677 dependents Pushed 2d ago 28% patched ~105d to patch Full package profile →

Do you use Gradio? You're affected.

How severe is it?

CVSS 3.1
7.5 / 10
EPSS
0.7%
chance of exploitation in 30 days
Higher than 50% 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, VulnCheck KEV, CISA SSVC, EPSS, Metasploit, Exploit-DB, trickest/cve, Nuclei templates, and inthewild.io exploitation reports.

What is the 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

What should I do?

1 step
  1. 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?

Decision Track
Exploitation none
Automatable Yes
Technical Impact partial

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:

EU AI Act
Article 15 - Accuracy, robustness and cybersecurity
ISO 42001
A.6.2.6 - AI system security

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

model serving UIsML demo / internal tooling dashboardsagent frameworks with Gradio front-ends

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

EU AI Act: Article 15
ISO 42001: A.6.2.6

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'): 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

Timeline

Published
July 1, 2026
Last Modified
July 14, 2026
First Seen
July 1, 2026

Related Vulnerabilities