CVE-2026-7178
7.3ChatGPTNextWeb · NextChat
A Server-Side Request Forgery vulnerability in the NextChat artifacts endpoint allows unauthenticated attackers to leak sensitive Cloudflare API tokens via directory traversal.
Executive summary
An unauthenticated Server-Side Request Forgery vulnerability in ChatGPTNextWeb NextChat versions 2.16.0 and 2.16.1 allows remote attackers to compromise sensitive Cloudflare infrastructure credentials.
Vulnerability
The application fails to sanitize the id query parameter in the /api/artifacts endpoint, allowing path traversal sequences to escape the intended Cloudflare KV namespace and invoke arbitrary Cloudflare API endpoints. This flaw allows an unauthenticated attacker to force the server to proxy requests using its own high-privileged CLOUDFLARE_KV_API_KEY.
Business impact
Successful exploitation leads to unauthorized access to the victim's Cloudflare account and infrastructure. Given the CVSS score of 7.3, this represents a significant risk of data exfiltration and potential takeover of cloud-hosted services. The exposure of API tokens could result in long-term persistence within the attacker's environment and severe reputational damage.
Remediation
Immediate Action: Upgrade to the latest available version of ChatGPTNextWeb NextChat that incorporates the fix for the artifacts endpoint vulnerability. If a patch is not yet available, immediately disable the affected functionality or restrict network access to the API endpoint.
Proactive Monitoring: Review web server and application logs for suspicious GET requests to /api/artifacts containing directory traversal strings such as ../. Monitor Cloudflare account audit logs for unexpected API calls originating from the application's service account.
Compensating Controls: Deploy a Web Application Firewall (WAF) to block requests containing path traversal sequences (../) targeting the /api/artifacts endpoint. Implement strict egress filtering on the server to prevent unauthorized outbound connections to the Cloudflare API root.
Exploitation status
Public Exploit Available: Yes, a functional proof-of-concept exists as detailed in the technical write-up by YLChen-007 on GitHub Gist.
Analyst recommendation
This vulnerability presents a high risk due to the potential for total compromise of cloud infrastructure credentials. Administrators must prioritize updating the affected software immediately. If immediate patching is not feasible, the exposure of the application to external networks should be minimized until robust filtering or remediation is implemented.
Sources
Originally found and disclosed by Eric-b (VulDB User), with VulDB CNA Team (coordinator), per the CVE Program record.
- VDB-359780 | ChatGPTNextWeb NextChat Artifacts Endpoint route.ts storeUrl server-side request forgery Vulnerability database entry
- VDB-359780 | CTI Indicators (IOB, IOC, IOA)
- Submit #797646 | nextchat <= 2.16.1 Server-Side Request Forgery (CWE-918) / Path Traversal (CWE-22) Third-party advisory
- Issue tracker
- Exploit / PoC
- github.com