CVE-2024-6090 in ChuanhuChatGPT
Summary
by MITRE • 06/27/2024
A path traversal vulnerability exists in gaizhenbiao/chuanhuchatgpt version 20240410, allowing any user to delete other users' chat histories. This vulnerability can also be exploited to delete any files ending in `.json` on the target system, leading to a denial of service as users are unable to authenticate.
Be aware that VulDB is the high quality source for vulnerability data.
Analysis
by VulDB Data Team • 07/15/2025
The vulnerability identified as CVE-2024-6090 represents a critical path traversal flaw within the chuanhuchatgpt application version 20240410, specifically affecting the gaizhenbiao repository. This security weakness stems from inadequate input validation and improper file handling mechanisms that allow malicious actors to manipulate file paths and access unauthorized system resources. The vulnerability exists at the application layer where user-provided data is not sufficiently sanitized before being used in file operations, creating an exploitable condition that bypasses normal access controls and authorization checks.
The technical implementation of this path traversal vulnerability enables attackers to manipulate file system operations through crafted input sequences that traverse directory structures beyond the intended boundaries. When the application processes user requests for chat history management, it fails to properly validate or sanitize the file paths, allowing an attacker to specify arbitrary file locations within the system. This flaw directly maps to CWE-22, which defines path traversal vulnerabilities as weaknesses that occur when applications fail to properly validate file paths, enabling attackers to access files outside of the intended directory structure. The vulnerability specifically impacts the application's file deletion functionality, where any authenticated user can exploit the flaw to target and remove chat history files belonging to other users.
The operational impact of CVE-2024-6090 extends beyond simple data deletion to encompass significant service disruption and authentication failures. Attackers can leverage this vulnerability to delete any files ending in the .json extension on the target system, which likely includes critical configuration files, user authentication data, and session information. This exploitation capability directly leads to denial of service conditions where legitimate users cannot authenticate or access their chat histories, effectively rendering the application unusable for its intended purpose. The vulnerability creates a persistent threat to system availability and data integrity, as the deletion of .json files can compromise the entire application's operational state and user experience. From an adversarial perspective, this vulnerability aligns with ATT&CK technique T1485 which describes data destruction and the modification of authentication credentials to disrupt service availability.
Mitigation strategies for CVE-2024-6090 should focus on implementing robust input validation and proper file path sanitization mechanisms within the application. Organizations should immediately update to the latest version of chuanhuchatgpt where this vulnerability has been addressed through proper path validation and access control enforcement. The implementation of a whitelist-based approach for file operations, combined with proper directory traversal prevention measures, can effectively prevent attackers from manipulating file paths to access unauthorized resources. Additionally, enforcing strict access controls and implementing proper authentication mechanisms will limit the scope of potential exploitation. Security measures should include validating all user inputs against expected patterns, implementing proper file system access controls, and ensuring that file operations are restricted to predefined directories with appropriate permission checks. Regular security audits and penetration testing should be conducted to identify and remediate similar vulnerabilities in other application components that may be susceptible to path traversal attacks.