☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2024-5823

CVE-2024-5823 Vulnerability in gaizhenbiao
📅 PUBLISHED: 2024-10-29 12:48 UTC 🔄 UPDATED: 2026-09-23 20:25 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: LIKELY — 2 independent sources confirm fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.55%
👁️
0.55% probability
13.7× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
Patch available — upgrade to latest release
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
6.5
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-5823 is a file overwrite vulnerability in the gaizhenbiao/chuanhuchatgpt project, affecting versions up to and including the 20240410 release. This vulnerability allows an unauthenticated attacker to overwrite critical configuration files on the server, leading to unauthorized changes in system behavior, security settings, or a denial of service (DoS) condition. The vulnerability has a CVSS score of 6.5 (Medium), with a low EPSS score of 0.0% indicating low exploitation activity in the wild. No public proof-of-concept (PoC) code or patch is currently available.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability affects a Python-based project (chuanhuchatgpt). The lack of a patch and the nature of the flaw (file overwrite) pose a significant supply chain risk. Organizations using this software should treat it as a critical dependency and monitor for updates. The absence of a patch means that any deployment is vulnerable to arbitrary file overwrite attacks, which could be used to inject malicious code or alter application behavior.

CVSS Breakdown & Threat Level

  • CVSS Score: 6.5 (Medium)
  • Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L
  • Attack Vector: Network (AV:N) – The vulnerability can be exploited remotely.
  • Attack Complexity: Low (AC:L) – No special conditions are required.
  • Privileges Required: None (PR:N) – No authentication needed.
  • User Interaction: None (UI:N) – No user action required.
  • Scope: Unchanged (S:U) – The impact is confined to the vulnerable component.
  • Confidentiality Impact: None (C:N) – No data exposure.
  • Integrity Impact: High (I:H) – Critical configuration files can be overwritten.
  • Availability Impact: Low (A:L) – DoS is possible but not guaranteed.

Threat Level: Medium. While the CVSS score is 6.5, the lack of a patch and the potential for full system compromise (via configuration file overwrite) elevates the risk for organizations using this software.

Deep Dive & Mechanics

The vulnerability resides in the file handling logic of chuanhuchatgpt. The application fails to properly validate or sanitize user-supplied file paths when processing uploads or configuration updates. An attacker can craft a request that specifies a path to a critical system file (e.g., config.json, settings.py, or even system files like /etc/passwd if permissions allow). The application then overwrites the target file with attacker-controlled content.

Root Cause: The application uses user input directly in file write operations without proper path traversal checks or validation. This allows an attacker to specify arbitrary file paths, including those outside the intended upload directory.

Attack Flow:

  1. The attacker identifies an endpoint that accepts file uploads or configuration data.
  2. The attacker crafts a request with a malicious file path (e.g., ../../config/settings.json).
  3. The application writes the attacker's data to the specified path, overwriting the original file.
  4. The attacker can then modify application behavior, disable security controls, or cause a denial of service by corrupting critical files.

Vulnerable vs. Patched Code

Since no patch is available, we can only analyze the vulnerable code pattern. The vulnerable code likely resembles:

# Vulnerable code (hypothetical)
def save_config(user_input):
    file_path = user_input['path']  # No validation
    content = user_input['content']
    with open(file_path, 'w') as f:
        f.write(content)

A patched version would include path validation:

# Patched code (hypothetical)
import os

ALLOWED_DIR = '/app/config/'

def save_config(user_input):
    file_path = os.path.normpath(user_input['path'])
    if not file_path.startswith(ALLOWED_DIR):
        raise ValueError("Invalid path")
    content = user_input['content']
    with open(file_path, 'w') as f:
        f.write(content)

Exploitation & Lab Setup

Red Team

Prerequisites:

  • Target running chuanhuchatgpt version <= 20240410.
  • Network access to the application's API endpoint.

Exploitation Steps:

  1. Identify the file upload or configuration endpoint (e.g., /api/upload or /api/config).
  2. Craft a request to overwrite a critical file. For example, to overwrite the application's main configuration file:
curl -X POST http://target:5000/api/config \
  -H "Content-Type: application/json" \
  -d '{"path": "/app/config/settings.json", "content": "{\"debug\": true, \"admin_password\": \"newpass\"}"}'
  1. To cause a denial of service, overwrite a file that the application requires to start:
curl -X POST http://target:5000/api/config \
  -H "Content-Type: application/json" \
  -d '{"path": "/app/main.py", "content": "import sys; sys.exit(1)"}'

Note: No public exploit code is available. The above is a hypothetical example based on the vulnerability description.

Blue Team

Detection:

  • Monitor for unusual file write operations to configuration directories.
  • Alert on requests containing path traversal sequences (../, ..\\).
  • Use file integrity monitoring (FIM) to detect unauthorized changes to critical files.

Hunting:

  • Search logs for requests to endpoints like /api/config or /api/upload with suspicious path parameters.
  • Look for sudden changes in application behavior or configuration.

Mitigation:

  • If possible, restrict file write operations to a specific directory using application-level controls.
  • Implement strict input validation and path sanitization.
  • Use a Web Application Firewall (WAF) to block path traversal attempts.

Indicators of Compromise (IOCs)

  • File Paths: Unauthorized writes to files outside the intended upload directory.
  • Log Entries: Requests containing ../ or ..\\ in file path parameters.
  • Network Traffic: POST requests to /api/config or similar endpoints with JSON payloads containing path and content fields.
  • System Changes: Unexpected modifications to configuration files (e.g., settings.json, config.py).
  • Hash Changes: File integrity monitoring alerts for critical files.

Detection Engineering

YARA Rule

rule CVE_2024_5823_File_Overwrite {
    meta:
        description = "Detects attempts to exploit CVE-2024-5823 file overwrite vulnerability in chuanhuchatgpt"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2024-5823"
    strings:
        $path_traversal = /\.\.\/|\.\.\\/
        $config_endpoint = "/api/config"
        $upload_endpoint = "/api/upload"
    condition:
        any of ($path_traversal) and any of ($config_endpoint, $upload_endpoint)
}

Sigma Rule

title: CVE-2024-5823 File Overwrite Attempt
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects attempts to exploit CVE-2024-5823 by monitoring for path traversal in file upload/config requests
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: apache
detection:
    selection:
        cs-method: 'POST'
        cs-uri-query|contains: 
            - '/api/config'
            - '/api/upload'
        cs-uri-query|re: '\.\.\/|\.\.\\'
    condition: selection
falsepositives:
    - Legitimate use of path traversal in other contexts (rare)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2024-5823 File Overwrite Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/api/config"; http_uri; content:"/api/upload"; http_uri; pcre:"/\.\.\/|\.\.\\/Ui"; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Isolate the application: If possible, restrict network access to the chuanhuchatgpt service until a patch is available.
  2. Implement input validation: Add server-side validation to ensure file paths are within allowed directories.
  3. Use a WAF: Deploy a Web Application Firewall with rules to block path traversal attempts.
  4. Monitor logs: Enable detailed logging and monitor for suspicious file write operations.

Long-term Fix:

  • Apply the patch: Once the vendor releases a fix, update to the patched version immediately.
  • Code review: Conduct a security review of the application's file handling logic.
  • Principle of least privilege: Run the application with minimal file system permissions.

Workarounds:

  • If the source code is available, manually add path validation (as shown in the patched code example).
  • Use a reverse proxy to filter requests containing path traversal sequences.

Valters IT

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-5823/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.