CVE-2024-12217 Path Traversal in gradio-app/gradio
Attackers can bypass file access restrictions on Windows to read blocked files using NTFS Alternate Data Streams syntax.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2024-12217?
CVE-2024-12217 is a medium-severity path traversal vulnerability in gradio-app/gradio, published on 20 Mar 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
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.
Weakness: CWE-22
Which versions are affected by CVE-2024-12217?
3 open source packages ship an affected version, including gradio.
| Package | Affected | Fixed in |
|---|---|---|
gradio PyPI | All versions to 5.0.1 | None |
gradio PyPI | All versions to 5.0.1 | None |
gradio PyPI | All versions to 5.0.1 | None |
How do I fix CVE-2024-12217?
No fix has been published for CVE-2024-12217 yet. Limit exposure of the affected software until one is available.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2024-12217 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-12217 exists.
Sources
Also known as GHSA-prpg-p95c-32fv, PYSEC-2026-1418.