NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · Gradio

CVE-2024-12217: Gradio Path Traversal vulnerability

mediumCVSS 3.0 5.3GHSA-prpg-p95c-32fv

On Windows, Gradio's `blocked_paths` protection can be bypassed with NTFS Alternate Data Stream syntax. A path such as `C:/tmp/secret.txt` is blocked, but `C:/tmp/secret.txt::$DATA` is not, so a remote user can read files the operator meant to block. The advisory data lists Gradio up to 5.0.1 as vulnerable and no patched version.

Published Mar 20, 2025 · Updated Mar 21, 2025 · Analysis Nov 1, 2026

What an attacker can do

Gradio lets an operator list files that must not be served. The check lives in gradio/utils.py (lines 1061 to 1074 in the referenced commit 67e4044). On Windows, NTFS accepts file::$DATA as another name for the file's main data stream. The check compares the path as written, so it sees a different string, lets it through, and the server returns the blocked file.

An unauthenticated remote user who can reach a Gradio app on Windows and can request file paths can read files that the operator thought were protected. The CVSS vector scores low confidentiality impact, because the attacker must know or guess the path, and gets only files the Gradio process can read. Linux and macOS hosts are not affected by this specific bypass, since it depends on NTFS stream syntax.

Who is affected

The pip package gradio at 5.0.1 and earlier, running on Windows, where the app relies on blocked_paths to hide files. The report was made against git commit 67e4044. Check the version and OS:

pip show gradio

Then look in your app for blocked_paths= in launch() or Blocks.

gradio

Ecosystem
PyPI
Affected
<= 5.0.1
Fixed in
No patched version yet
Check
pip show gradio

How to fix it

The advisory data lists no patched Gradio version and the sources give no fix commit. Upgrade to the latest Gradio and test whether a ::$DATA suffix on a blocked path is still served.

Do not depend on blocked_paths alone on Windows. Keep sensitive files outside the working directory and outside any folder Gradio is allowed to serve, or run the app on Linux. Restrict file permissions for the account running Gradio.

How to tell if you were hit

Search web server or proxy logs for requests to Gradio file routes whose path ends in ::$DATA or contains ::. Any hit means someone probed the bypass. Compare with the paths you list in blocked_paths.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

A vulnerability in the gradio-app/gradio repository, version git 67e4044, allows for path traversal on Windows OS. The implementation of the blocked_path functionality, which is intended to disallow users from reading certain files, is flawed. Specifically, while the application correctly blocks access to paths like 'C:/tmp/secret.txt', it fails to block access when using NTFS Alternate Data Streams (ADS) syntax, such as 'C:/tmp/secret.txt::$DATA'. This flaw can lead to unauthorized reading of blocked file paths.

Questions

Is Linux affected by CVE-2024-12217?

The advisory describes path traversal on Windows through NTFS Alternate Data Streams. Nothing in the sources says the same bypass works on other systems.

What does `::$DATA` do?

It is NTFS syntax that names a file's default data stream. It opens the same file, but the blocked path check does not recognise the string as the blocked path.

Is there a fixed Gradio version?

None is listed. Gradio 5.0.1 and earlier are marked vulnerable. Use the latest release and test the bypass yourself.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More Gradio vulnerabilities

All Gradio entries