CVE-2024-4941

Local File Inclusion in JSON component in gradio-app/gradio

HIGH
7.5
CVSS Score
Published: June 6, 2024 at 05:55 PM UTC
Updated: June 17, 2026 at 08:03 AM UTC
2 products affected across 2 vendorsGradioProject Gradio

Using gradio-app/gradio by gradio-app?

Get instant alerts when new vulnerabilities affect gradio-app/gradio - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.5
Exploit prediction
EPSS 0.8%
SSVC
PoC

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 4.31.4
Affected range stops below 4.31.4, so it looks safe — our inference, not a vendor statement
v < 4.31.4
Affected range stops below 4.31.4, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

SSVC — Action Prioritization

SSVCPoCAutomatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
NONE
Availability
NONE
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-20NVD-CWE-noinfoCWE-22

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card