CVE-2024-5822

9.8 CRITICAL

📋 TL;DR

This SSRF vulnerability in ChuanhuChatGPT's upload processing interface allows attackers to make the server send requests to internal or external resources, potentially accessing sensitive data or bypassing security controls. It affects all users running vulnerable versions of gaizhenbiao/ChuanhuChatGPT. With a CVSS score of 9.8, this is a critical vulnerability requiring immediate attention.

💻 Affected Systems

Products:
  • gaizhenbiao/ChuanhuChatGPT
Versions: All versions <= ChuanhuChatGPT-20240410-git.zip
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability exists in the upload processing interface; any deployment with this feature enabled is vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could access internal services, exfiltrate sensitive data, perform port scanning, or chain with other vulnerabilities to achieve remote code execution.

🟠

Likely Case

Attackers access internal APIs, cloud metadata services, or sensitive files, leading to data exposure and potential lateral movement.

🟢

If Mitigated

With proper network segmentation and input validation, impact is limited to denial of service or limited information disclosure.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

SSRF vulnerabilities are commonly exploited; public details available on huntr.com.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Versions after ChuanhuChatGPT-20240410-git.zip

Vendor Advisory: https://huntr.com/bounties/b24f1b5f-a529-435b-ac4d-5ca71d5d1fb5

Restart Required: Yes

Instructions:

1. Update to the latest version from the official repository. 2. Restart the ChuanhuChatGPT service. 3. Verify the fix by testing the upload interface.

🔧 Temporary Workarounds

Disable upload processing

all

Temporarily disable the vulnerable upload processing interface

Modify configuration to disable file uploads or restrict to trusted sources

Network segmentation

all

Restrict outbound network access from the vulnerable server

Configure firewall rules to block outbound HTTP/HTTPS requests from the application server

🧯 If You Can't Patch

  • Implement strict input validation and URL filtering in the upload handler
  • Deploy a web application firewall (WAF) with SSRF protection rules

🔍 How to Verify

Check if Vulnerable:

Test the upload interface with SSRF payloads (e.g., http://169.254.169.254/latest/meta-data/) and observe if the server makes the request.

Check Version:

Check the application version in the interface or configuration files; ensure it's newer than ChuanhuChatGPT-20240410-git.zip.

Verify Fix Applied:

After patching, repeat the SSRF test; the server should reject or sanitize the malicious URLs.

📡 Detection & Monitoring

Log Indicators:

  • Unusual outbound HTTP requests from the server
  • Requests to internal IP addresses or metadata services
  • Multiple failed upload attempts with URL-like parameters

Network Indicators:

  • Outbound HTTP requests to internal network segments
  • Requests to cloud metadata endpoints from application servers
  • Unusual port scanning activity originating from the server

SIEM Query:

source="chuanhuchatgpt.logs" AND (url="*169.254.169.254*" OR url="*localhost*" OR url="*127.0.0.1*" OR url="*metadata*" OR url="*internal*" OR url="*192.168.*" OR url="*10.*" OR url="*172.16.*")

🔗 References

📤 Share & Export