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

CVE-2024-9216

CVE-2024-9216 Authentication Bypass in Gaizhenbiao
📅 PUBLISHED: 2025-03-20 10:11 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: 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 8.1
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: H Confidentiality High
I: H Integrity High
A: N Availability None
8.1
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-9216 is an authentication bypass vulnerability in the gaizhenbiao/ChuanhuChatGPT project, as of commit 3856d4f. The flaw allows any unauthenticated attacker to read and delete other users' chat history by manipulating the username parameter in HTTP requests. The root cause is that the application trusts client-supplied usernames instead of deriving them from a secure session source (e.g., cookies or tokens). With a CVSS score of 8.1, this vulnerability poses a high risk to confidentiality and integrity of user data. No official patch has been released, and the EPSS score is 0.0%, indicating low exploitation likelihood at this time, but the attack vector is trivial.

⚡ 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 the Python-based ChuanhuChatGPT project, which is distributed via GitHub. Users who deploy this application from the affected commit are at risk. There is no known PyPI package for this project, but if it were distributed via PyPI, the same trust boundary issue would apply. Organizations should verify their deployment version and apply any available patches or workarounds.

CVSS Breakdown & Threat Level

  • Attack Vector (AV): Network (N) – Exploitable remotely.
  • Attack Complexity (AC): Low (L) – No special conditions required.
  • Privileges Required (PR): None (N) – No authentication needed.
  • User Interaction (UI): None (N) – No user action required.
  • Scope (S): Unchanged (U) – Impact confined to the vulnerable component.
  • Confidentiality (C): High (H) – Full read access to chat history.
  • Integrity (I): High (H) – Ability to delete chat history.
  • Availability (A): None (N) – No denial of service.

Threat Level: High. The vulnerability is easy to exploit and can lead to significant data breaches.

Deep Dive & Mechanics

The vulnerability resides in the get_model function, which accepts a username parameter directly from the HTTP request. The application does not validate that the provided username matches the authenticated session. An attacker can craft a request with any username to access or delete that user's chat history.

Attack Flow:

  1. The attacker sends a GET or POST request to an endpoint that calls get_model, including a username parameter.
  2. The server processes the request using the attacker-supplied username.
  3. The attacker gains unauthorized access to the victim's chat history or can delete it.

Example vulnerable code snippet (conceptual):

def get_model(username):
    # No authentication check
    user_data = load_user_data(username)
    return user_data

Vulnerable vs. Patched Code

Vulnerable Code (commit 3856d4f):

def get_model(username):
    # Directly uses client-supplied username
    user_data = load_user_data(username)
    return user_data

Patched Code (hypothetical):

def get_model(username):
    # Derive username from session or token
    session_username = get_authenticated_user()
    if session_username != username:
        raise PermissionError("Unauthorized")
    user_data = load_user_data(session_username)
    return user_data

Exploitation & Lab Setup

Red Team

Prerequisites:

  • Target running ChuanhuChatGPT from commit 3856d4f.
  • Network access to the application.

Exploit Steps:

  1. Identify the target endpoint (e.g., /api/chat or /get_history).
  2. Send a request with a manipulated username parameter.

Example using curl:

curl -X GET "http://target.com/api/get_history?username=victim_user"

Example using Python:

import requests

target = "http://target.com/api/get_history"
params = {"username": "victim_user"}
response = requests.get(target, params=params)
print(response.text)

To delete chat history:

curl -X DELETE "http://target.com/api/delete_history?username=victim_user"

Blue Team

Detection:

  • Monitor for requests with unusual username parameters that do not match the authenticated session.
  • Log all access to chat history endpoints and correlate with session tokens.

Mitigation:

  • Implement server-side session validation.
  • Use secure cookies or tokens to identify users.
  • Apply input validation and authorization checks.

Indicators of Compromise (IOCs)

  • Network IOCs:
    • HTTP requests to /api/get_history or /api/delete_history with a username parameter.
    • Anomalous patterns of username values not matching session tokens.
  • Log IOCs:
    • Access logs showing multiple usernames from the same IP.
    • Error logs indicating unauthorized access attempts.
  • File IOCs:
    • Unauthorized modifications to chat history files.

Detection Engineering

YARA Rule

rule CVE_2024_9216_ChuanhuChatGPT_AuthBypass {
    meta:
        description = "Detects exploitation attempts for CVE-2024-9216"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "https://nvd.nist.gov/vuln/detail/CVE-2024-9216"
    strings:
        $s1 = "username=" ascii wide nocase
        $s2 = "/api/get_history" ascii wide nocase
        $s3 = "/api/delete_history" ascii wide nocase
    condition:
        any of ($s1) and any of ($s2, $s3)
}

Sigma Rule

title: CVE-2024-9216 ChuanhuChatGPT Authentication Bypass
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects attempts to exploit authentication bypass in ChuanhuChatGPT
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: apache
    service: access
detection:
    selection:
        cs-uri-query|contains:
            - "username="
        cs-uri-stem|contains:
            - "/api/get_history"
            - "/api/delete_history"
    condition: selection
falsepositives:
    - Legitimate admin operations
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2024-9216 ChuanhuChatGPT Auth Bypass"; flow:to_server; content:"username="; http_uri; content:"/api/get_history"; http_uri; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Disable affected endpoints if possible, or restrict access via firewall rules.
  2. Implement session validation – Derive the username from a secure session token or cookie.
  3. Apply input validation – Ensure the username matches the authenticated user.

Long-term Fix:

  • Update to a patched version once available.
  • Conduct a security audit of the application's authentication logic.

Workaround:

  • Use a reverse proxy to enforce authentication before requests reach the application.

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-9216/ · 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.