CVE-2023-49785
📋 TL;DR
CVE-2023-49785 is a server-side request forgery (SSRF) and cross-site scripting (XSS) vulnerability in NextChat (ChatGPT-Next-Web) that allows attackers to access internal HTTP endpoints and use the application as an open proxy. This enables data exfiltration, internal network scanning, and masking of malicious traffic. Users running NextChat versions 2.11.2 and earlier are affected.
💻 Affected Systems
- NextChat
- ChatGPT-Next-Web
📦 What is this software?
Nextchat by Nextchat
⚠️ Risk & Real-World Impact
Worst Case
Complete compromise of internal network resources, data exfiltration from internal services, and use of the application as a proxy for attacks against other internet targets.
Likely Case
Unauthorized access to internal HTTP endpoints, potential data leakage from internal services, and abuse as an open proxy for malicious traffic.
If Mitigated
Limited impact if isolated from internal networks and internet-facing access is restricted.
🎯 Exploit Status
Exploitation requires network access to the application but no authentication. Public proof-of-concept details are available in security advisories.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: None
Vendor Advisory: https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/issues/4283
Restart Required: No
Instructions:
No official patch is available. Monitor the GitHub repository for updates and apply when released.
🔧 Temporary Workarounds
Network Isolation
allIsolate the application from internal networks and restrict internet-facing access.
Access Control
allImplement strict network access controls and firewall rules to limit inbound connections.
🧯 If You Can't Patch
- Remove the application from internet-facing networks entirely.
- Deploy in an isolated network segment with no access to internal resources.
🔍 How to Verify
Check if Vulnerable:
Check the application version. If running 2.11.2 or earlier, it is vulnerable.
Check Version:
Check the application's version in its interface or deployment configuration.
Verify Fix Applied:
Verify version is updated beyond 2.11.2 once a patch is released.
📡 Detection & Monitoring
Log Indicators:
- Unusual HTTP requests to internal endpoints
- Requests with unexpected source IPs
Network Indicators:
- Outbound traffic from NextChat to unexpected internal or external targets
SIEM Query:
Look for HTTP requests from NextChat to non-standard ports or internal IP ranges.
🔗 References
- https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web
- https://www.horizon3.ai/attack-research/attack-blogs/nextchat-an-ai-chatbot-that-lets-you-talk-to-anyone-you-want-to/
- https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web
- https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/issues/4283
- https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/pull/4285
- https://www.horizon3.ai/attack-research/attack-blogs/nextchat-an-ai-chatbot-that-lets-you-talk-to-anyone-you-want-to/
- https://www.vicarius.io/vsociety/posts/hacking-ai-chatbots-for-fun-and-learning-analyzing-an-unauthenticated-ssrf-and-reflected-xss-in-chatgpt-next-web-cve-2023-49785
- https://www.vicarius.io/vsociety/posts/hacking-ai-chatbots-for-fun-and-learning-analyzing-an-unauthenticated-ssrf-and-reflected-xss-in-chatgpt-next-web-cve-2023-49785