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

CVE-2024-0964: Gradio Path Traversal vulnerability

highCVSS 3.0 7.5GHSA-f3h9-8phc-6gvh

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 gradio

gradio

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 entries