CVE-2024-6037 Overview
A vulnerability in gaizhenbiao/chuanhuchatgpt version 20240410 allows an attacker to create arbitrary folders at any location on the server, including the root directory (C: dir). This flaw enables uncontrolled resource consumption, potentially resulting in resource exhaustion, denial of service (DoS), server unavailability, and data loss or corruption.
Critical Impact
Remote attackers can exploit this vulnerability without authentication to create unlimited directories anywhere on the server filesystem, leading to disk exhaustion, system instability, and potential denial of service conditions.
Affected Products
- gaizhenbiao chuanhuchatgpt version 20240410
Discovery Timeline
- 2024-07-10 - CVE-2024-6037 published to NVD
- 2025-10-15 - Last updated in NVD database
Technical Details for CVE-2024-6037
Vulnerability Analysis
This vulnerability is classified under CWE-770 (Allocation of Resources Without Limits or Throttling). The affected application fails to properly validate or restrict directory creation operations, allowing attackers to specify arbitrary paths when creating folders. Since the vulnerability is network-accessible and requires no authentication or user interaction, it presents a significant risk to affected deployments.
The impact manifests in two primary ways: integrity compromise through unauthorized filesystem modifications, and availability impact through resource exhaustion. An attacker can repeatedly create directories to fill disk space, exhaust inode allocations, or create deeply nested directory structures that impact system performance.
Root Cause
The root cause stems from improper input validation in the folder creation functionality. The application does not adequately sanitize or restrict user-supplied path parameters, allowing path traversal sequences or absolute paths to be processed. This enables attackers to escape intended directory boundaries and create folders in sensitive system locations, including the root directory.
Attack Vector
The attack is conducted remotely over the network without requiring any authentication or user interaction. An attacker can send maliciously crafted requests to the application endpoint responsible for folder creation, specifying arbitrary paths including:
- Absolute paths targeting system directories
- Path traversal sequences to escape application boundaries
- Repetitive requests to exhaust filesystem resources
The vulnerability allows attackers to create folders in any accessible location on the server filesystem. By repeatedly exploiting this flaw, an attacker can exhaust disk space or inode allocations, causing denial of service conditions that affect the entire server and any other applications running on it.
Detection Methods for CVE-2024-6037
Indicators of Compromise
- Unusual directory creation activity in system root or sensitive directories
- Rapid filesystem space consumption without corresponding legitimate activity
- Presence of unexpected empty directories in root filesystem or system paths
- HTTP request logs showing unusual path parameters in folder creation endpoints
Detection Strategies
- Monitor filesystem events for directory creation operations outside expected application directories
- Implement anomaly detection for rapid or repeated folder creation requests from single sources
- Review web server access logs for requests containing path traversal patterns (../ sequences) or absolute paths
- Deploy file integrity monitoring on critical system directories to detect unauthorized modifications
Monitoring Recommendations
- Configure real-time alerting for directory creation events in root or system directories
- Establish baseline metrics for normal directory creation rates and alert on deviations
- Monitor disk space utilization trends and configure alerts for unexpected consumption spikes
- Review application logs for error messages related to path validation or filesystem operations
How to Mitigate CVE-2024-6037
Immediate Actions Required
- Upgrade ChuanhuChatGPT to a patched version that addresses this vulnerability
- Restrict network access to the affected application using firewall rules or network segmentation
- Implement web application firewall (WAF) rules to block requests containing path traversal patterns
- Monitor filesystem activity for signs of active exploitation
Patch Information
A fix has been committed to the ChuanhuChatGPT repository. Organizations should apply the security patch referenced in the GitHub Commit. Additional details about this vulnerability are available in the Huntr Bounty Listing.
Workarounds
- Run the application with minimal filesystem permissions, restricting write access to only necessary directories
- Deploy the application in a containerized environment with restricted filesystem mounts
- Implement reverse proxy rules to validate and sanitize path parameters before reaching the application
- Enable disk quotas on the filesystem hosting the application to limit potential resource exhaustion impact
# Example: Restrict application filesystem permissions
# Create dedicated application directory with restricted permissions
mkdir -p /var/lib/chuanhuchatgpt/data
chown appuser:appgroup /var/lib/chuanhuchatgpt/data
chmod 750 /var/lib/chuanhuchatgpt/data
# Run application with restricted user that cannot write outside designated directories
# Ensure application runs as non-root user with limited filesystem access
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

