CVE-2024-0964: Gradio Path Traversal vulnerability
Gradio before 4.9.0 has a local file inclusion flaw that a remote caller can trigger with a crafted JSON value in an API request. The caller can read files from the Gradio server's disk without logging in. Upgrade to gradio 4.9.0.
Published Feb 6, 2024 · Updated May 19, 2026 · Analysis Nov 2, 2026
What an attacker can do
The advisory is short. It says a user-supplied JSON value in an API request leads to local file inclusion, classed as path traversal (CWE-22). The value is not checked well enough, so the server can be made to return files outside what the app means to serve. The sources I could read do not name the endpoint, the JSON field or the payload.
The CVSS vector is network, no privileges, no user interaction, with high confidentiality impact and none for integrity or availability. An attacker who can reach the app's API can therefore read files the Gradio process can read. Typical targets on an ML host are source code, .env files, API keys, SSH keys and model files. The attacker cannot write or change files through this flaw. Public demos and Hugging Face Spaces are the common exposure.
Who is affected
gradio on PyPI below 4.9.0, on any host where an untrusted party can reach the app's API. Authentication on the app is not mentioned as a barrier in the advisory.
Check the installed version:
pip show gradiogradio
- Ecosystem
- PyPI
- Affected
- < 4.9.0
- Fixed in
- 4.9.0
- Check
pip show gradio
How to fix it
Upgrade to gradio 4.9.0 or later:
pip install --upgrade "gradio>=4.9.0"Restart the app afterwards. The advisory references a fix commit but I could not confirm from it which check was added, and it lists no workaround. If you cannot upgrade, keep the app off untrusted networks and run it as a user that has no access to secrets.
How to tell if you were hit
Review access logs for API requests whose JSON bodies contain path-like values, such as ../ sequences, absolute paths like /etc/passwd or file names such as .env. Responses that return file contents to anonymous clients point to a hit. On the host, check which secrets the Gradio process could read and rotate them if you have signs of abuse. Verify the gradio version in each environment and container image.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
A local file include could be remotely triggered in Gradio due to a vulnerable user-supplied JSON value in an API request.
Questions
- Is gradio 4.9.0 affected by CVE-2024-0964?
No. 4.9.0 is the patched version. Anything below it is vulnerable.
- Can the attacker write files or run code?
Not through this flaw. The CVSS vector scores only confidentiality as high, so the effect is reading files that the Gradio process can access.
- Does the attacker need to log in?
No. The vector requires no privileges and no user interaction. The caller needs network access to the app's API.
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 entriesCVE-2026-49119
Gradio FileExplorer preprocess path traversal allows files outside root_dir to reach callbacks
high7.5Jul 1, 2026CVE-2026-10783
Gradio: Audio cache key ignores metadata when saving numpy audio outputs
low2.5Jun 4, 2026CVE-2026-48545
Gradio contains a cookie injection vulnerability
high6.8May 27, 2026CVE-2026-27167
Gradio: Mocked OAuth Login Exposes Server Credentials and Uses Hardcoded Session Secret
lowMar 1, 2026CVE-2026-28414
Gradio is Vulnerable to Absolute Path Traversal on Windows with Python 3.13+
high7.5Mar 1, 2026CVE-2026-28415
Gradio has an Open Redirect in its OAuth Flow
medium4.3Mar 1, 2026
