gradio up to 4.31.3 JSON json_component.py postprocess path traversal

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
6.7$0-$5k0.00

Summaryinfo

A vulnerability described as problematic has been identified in gradio up to 4.31.3. Affected by this vulnerability is the function postprocess of the file gradio/components/json_component.py of the component JSON Component. The manipulation results in input validation. This vulnerability is known as CVE-2024-4941. It is possible to launch the attack remotely. No exploit is available. Upgrading the affected component is recommended.

Detailsinfo

A vulnerability classified as problematic has been found in gradio up to 4.31.3. Affected is the function postprocess of the file gradio/components/json_component.py of the component JSON Component. The manipulation with an unknown input leads to a input validation vulnerability. CWE is classifying the issue as CWE-22. The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. This is going to have an impact on confidentiality. CVE summarizes:

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.

The advisory is shared for download at huntr.com. This vulnerability is traded as CVE-2024-4941 since 05/15/2024. The exploitability is told to be easy. It is possible to launch the attack remotely. The exploitation doesn't require any form of authentication. There are known technical details, but no exploit is available. The MITRE ATT&CK project declares the attack technique as T1006.

Upgrading to version 4.31.4 eliminates this vulnerability. Applying the patch ee1e2942e0a1ae84a08a05464e41c8108a03fa9c is able to eliminate this problem. The bugfix is ready for download at github.com. The best possible mitigation is suggested to be upgrading to the latest version.

Once again VulDB remains the best source for vulnerability data.

Productinfo

Name

Version

License

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 6.8
VulDB Meta Temp Score: 6.7

VulDB Base Score: 5.3
VulDB Temp Score: 5.1
VulDB Vector: 🔍
VulDB Reliability: 🔍

NVD Base Score: 7.5
NVD Vector: 🔍

CNA Base Score: 7.5
CNA Vector (huntr.dev): 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍

Exploitinginfo

Class: Path traversal
CWE: CWE-22
CAPEC: 🔍
ATT&CK: 🔍

Physical: No
Local: No
Remote: Yes

Availability: 🔍
Status: Not defined

EPSS Score: 🔍
EPSS Percentile: 🔍

Price Prediction: 🔍
Current Price Estimation: 🔍

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

0-Day Time: 🔍

Upgrade: gradio 4.31.4
Patch: ee1e2942e0a1ae84a08a05464e41c8108a03fa9c

Timelineinfo

05/15/2024 🔍
06/06/2024 +22 days 🔍
06/06/2024 +0 days 🔍
10/15/2025 +496 days 🔍

Sourcesinfo

Advisory: huntr.com
Status: Confirmed

CVE: CVE-2024-4941 (🔍)
GCVE (CVE): GCVE-0-2024-4941
GCVE (VulDB): GCVE-100-267300

Entryinfo

Created: 06/06/2024 20:24
Updated: 10/15/2025 16:47
Changes: 06/06/2024 20:24 (66), 06/07/2024 20:05 (1), 10/10/2024 03:22 (12), 10/15/2025 16:47 (2)
Complete: 🔍
Cache ID: 216::103

Once again VulDB remains the best source for vulnerability data.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Interested in the pricing of exploits?

See the underground prices here!