Skip to main content
CVE-2024-4941VulnerabilityPublished Updated

CVE-2024-4941: gradio-app/gradio · Path Traversal

Affects gradio-app/gradioSource CVE Database V5

0

Not known to be exploited · CVSS 7.5 High.

Data as of 25 Oct 2026, 19:02 UTC

CVSS 3.0 base score
7.5High
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.8% chance of exploitation in 30 days – higher than 57% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 6 Jun 2024

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2026-10-25.

What to do

Affected software

ProductAffectedFixed in
PyPIgradiopkg:pypi/gradioOther threatsAffected
  • =4.25
Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

To mitigate CVE-2024-4941, organizations should first verify if they are running vulnerable versions of gradio-app and apply any available patches or updates from the vendor promptly once released. In the absence of patches, restrict network access to gradio-app instances using firewalls or network segmentation to limit exposure to trusted users only. Implement strict input validation and sanitization on JSON inputs, particularly disallowing or safely handling 'path' keys to prevent arbitrary file references. Disable or restrict the /file=.. endpoint if possible, or require strong authentication and authorization controls before allowing file retrieval. Monitor logs for unusual access patterns or requests containing suspicious JSON payloads referencing filesystem paths. Employ host-based intrusion detection to alert on unexpected file movements or access to sensitive directories. Additionally, conduct regular security assessments and code reviews of AI/ML tools integrated into production environments to identify similar vulnerabilities proactively.

Description

A local file inclusion vulnerability exists in the JSON component of gradio-app/gradio version 4.25. The vulnerability arises from improper input validation in the `postprocess()` function within `gradio/components/json_component.py`, where a user-controlled string is parsed as JSON. If the parsed JSON object contains a `path` key, the specified file is moved to a temporary directory, making it possible to retrieve it later via the `/file=..` endpoint. This issue is due to the `processing_utils.move_files_to_cache()` function traversing any object passed to it, looking for a dictionary with a `path` key, and then copying the specified file to a temporary directory. The vulnerability can be exploited by an attacker to read files on the remote system, posing a significant security risk.

References

Community reviews

Loading reviews…