Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-105238 Overview
CVE-2026-105238 is a Server-Side Request Forgery (SSRF) vulnerability in ChatGPTNextWeb NextChat versions up to 2.16.1. The flaw resides in the proxyHandler function within app/api/proxy.ts, part of the Proxy Fallback Handler component. Attackers can manipulate the x-base-url argument to cause the server to issue arbitrary outbound HTTP requests. The attack is remotely exploitable without authentication or user interaction. Public exploit details have been published, and a pull request to fix the issue is still awaiting acceptance upstream. The weakness is classified under [CWE-918: Server-Side Request Forgery].
Critical Impact
Unauthenticated remote attackers can abuse the NextChat proxy to send server-originated HTTP requests to internal services, cloud metadata endpoints, or other restricted targets.
Affected Products
- ChatGPTNextWeb NextChat up to and including version 2.16.1
- Component: Proxy Fallback Handler (app/api/proxy.ts)
- Function: proxyHandler processing the x-base-url header
Discovery Timeline
- 2026-10-05 - CVE-2026-105238 published to NVD
- 2026-10-06 - Last updated in NVD database
Technical Details for CVE-2026-105238
Vulnerability Analysis
NextChat ships a server-side proxy endpoint intended to relay client requests to upstream AI providers. The proxyHandler function in app/api/proxy.ts reads the x-base-url HTTP header from the incoming request and uses it as the destination for the outbound call. Because the header value is not validated against an allowlist of trusted hosts, an attacker can substitute any URL, including internal addresses such as http://127.0.0.1, http://169.254.169.254, or RFC1918 ranges. The NextChat server then executes the request on behalf of the attacker and returns the response body. This grants reconnaissance and interaction capabilities against resources normally shielded from the public internet.
Root Cause
The root cause is missing input validation on the x-base-url header before it is used to construct the proxied request. The handler trusts a client-controlled value as the request target, which satisfies the classic SSRF precondition under [CWE-918]. No scheme restriction, host allowlist, or network-boundary check filters the destination.
Attack Vector
Exploitation requires only a single HTTP request to the NextChat proxy endpoint with a crafted x-base-url header pointing at an internal or sensitive target. No credentials and no user interaction are required. Typical abuse paths include cloud instance metadata service enumeration, internal admin interface probing, and port scanning of co-located services from the NextChat host.
See the GitHub NextChat Issue #6813 and the proposed fix in Pull Request #6884 for the technical specifics of the vulnerable code path.
Detection Methods for CVE-2026-105238
Indicators of Compromise
- Inbound requests to the NextChat /api/proxy endpoint carrying an x-base-url header pointing to private IP ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16), loopback (127.0.0.1), or link-local (169.254.169.254).
- Outbound HTTP connections from the NextChat server process to cloud metadata endpoints or internal services it does not normally reach.
- Unexpected response sizes or latencies on proxy requests, indicating connections to unintended backends.
Detection Strategies
- Inspect reverse-proxy and application logs for x-base-url header values that deviate from the configured upstream AI provider hostnames.
- Correlate proxy endpoint access with egress firewall logs to identify server-initiated requests to non-approved destinations.
- Deploy WAF rules that reject requests to /api/proxy when x-base-url resolves to private, loopback, or metadata address ranges.
Monitoring Recommendations
- Alert on any outbound traffic from the NextChat host to 169.254.169.254 or internal management subnets.
- Baseline normal proxy destinations and flag deviations in SIEM dashboards.
- Enable DNS query logging on the NextChat host to identify unexpected hostname lookups triggered by proxied requests.
How to Mitigate CVE-2026-105238
Immediate Actions Required
- Restrict network egress from the NextChat server to only the hostnames of approved upstream AI providers.
- Place the NextChat /api/proxy endpoint behind authentication or an authenticated reverse proxy until a patched release is available.
- Block requests containing an x-base-url header that resolves to private, loopback, link-local, or cloud metadata addresses.
Patch Information
As of the NVD publication date, the upstream fix is tracked in GitHub Pull Request #6884 and has not yet been merged. Monitor the NextChat repository for a release that incorporates the fix and upgrade beyond version 2.16.1 once available. Additional vulnerability metadata is published on VulDB entry for CVE-2026-105238.
Workarounds
- Disable the proxy fallback feature in NextChat if not required by the deployment.
- Deploy a WAF or reverse proxy rule that validates the x-base-url header against an allowlist of upstream hostnames.
- Run the NextChat container in a network namespace with egress firewall rules limiting outbound destinations to approved provider endpoints.
# Example nginx rule to block internal-target SSRF via x-base-url
location /api/proxy {
if ($http_x_base_url ~* "(127\.0\.0\.1|localhost|169\.254\.169\.254|10\.|192\.168\.|172\.(1[6-9]|2[0-9]|3[0-1])\.)") {
return 403;
}
proxy_pass http://nextchat_upstream;
}
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

