/

CVE-2026-105238

Severity:

HIGH RISK

(7.3)

Server-Side Request Forgery (CWE-918) in NextChat Proxy Handler

CVE-2026-105238

Deferred

Vulnerability type

Category:

Server-Side Request Forgery

CWE:

CWE-918

Impact:

Unauthorized Server-Side Network Requests

Severity:

HIGH RISK

(7.3)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A high-severity server-side request forgery vulnerability in NextChat affects the Proxy Fallback Handler when it processes the user-controlled x-base-url argument. A remote attacker may influence server-side requests to reach unintended internal or external resources when the proxy endpoint is accessible and destination controls are insufficient.

A high-severity server-side request forgery vulnerability in NextChat affects the Proxy Fallback Handler when it processes the user-controlled x-base-url argument. A remote attacker may influence server-side requests to reach unintended internal or external resources when the proxy endpoint is accessible and destination controls are insufficient.

Affected context

The vulnerability occurs in NextChat deployments using the proxy functionality implemented in app/api/proxy.ts. It becomes risky when the proxy handler accepts an attacker-influenced base URL and uses it to construct outbound requests without sufficiently restricting destinations, protocols, redirects, or access to internal network ranges.

The vulnerability occurs in NextChat deployments using the proxy functionality implemented in app/api/proxy.ts. It becomes risky when the proxy handler accepts an attacker-influenced base URL and uses it to construct outbound requests without sufficiently restricting destinations, protocols, redirects, or access to internal network ranges.

Exploit preconditions

  • Attack surface: The remotely accessible proxy endpoint exposed by the NextChat application
  • Required access: The ability to submit requests to the proxy handler; authentication requirements depend on deployment configuration
  • Trigger point: Processing of the x-base-url argument by proxyHandler
  • Why exploitation is possible: The server may use attacker-controlled URL information when making outbound requests without adequate destination validation or network-level restrictions
  • Attack surface: The remotely accessible proxy endpoint exposed by the NextChat application
  • Required access: The ability to submit requests to the proxy handler; authentication requirements depend on deployment configuration
  • Trigger point: Processing of the x-base-url argument by proxyHandler
  • Why exploitation is possible: The server may use attacker-controlled URL information when making outbound requests without adequate destination validation or network-level restrictions

Why this happens

The underlying bug is insufficient validation and trust-boundary enforcement for a client-controlled URL parameter. When a server acts as a proxy based on attacker-influenced destination data, it can be induced to make requests on the attacker's behalf to destinations that the client cannot access directly. This behavior maps to CWE-918: Server-Side Request Forgery.

The underlying bug is insufficient validation and trust-boundary enforcement for a client-controlled URL parameter. When a server acts as a proxy based on attacker-influenced destination data, it can be induced to make requests on the attacker's behalf to destinations that the client cannot access directly. This behavior maps to CWE-918: Server-Side Request Forgery.

Potential impact

  • Access to services on internal networks
  • Retrieval of cloud or application metadata
  • Exposure of responses containing sensitive information
  • Network reconnaissance from the application environment
  • Requests to protected administrative or internal endpoints
  • Potential follow-on compromise if reachable services are vulnerable
  • Access to services on internal networks
  • Retrieval of cloud or application metadata
  • Exposure of responses containing sensitive information
  • Network reconnaissance from the application environment
  • Requests to protected administrative or internal endpoints
  • Potential follow-on compromise if reachable services are vulnerable

General mitigation guidance

Mitigation generally focuses on reducing trust in client-supplied destinations and ensuring proxy behavior is constrained by default.

Common defensive patterns include:

  • Allowing only explicitly approved destinations, schemes, ports, and hostnames
  • Resolving and validating destination addresses before connecting
  • Blocking loopback, link-local, private, reserved, and other restricted network ranges
  • Rechecking destinations after redirects and preventing unrestricted redirect following
  • Separating proxy functionality from sensitive network segments
  • Applying egress filtering and least-privilege network policies
  • Avoiding the forwarding of sensitive credentials or internal headers
  • Requiring authentication and authorization where proxy access is not intended to be public

Mitigation generally focuses on reducing trust in client-supplied destinations and ensuring proxy behavior is constrained by default.

Common defensive patterns include:

  • Allowing only explicitly approved destinations, schemes, ports, and hostnames
  • Resolving and validating destination addresses before connecting
  • Blocking loopback, link-local, private, reserved, and other restricted network ranges
  • Rechecking destinations after redirects and preventing unrestricted redirect following
  • Separating proxy functionality from sensitive network segments
  • Applying egress filtering and least-privilege network policies
  • Avoiding the forwarding of sensitive credentials or internal headers
  • Requiring authentication and authorization where proxy access is not intended to be public

How teams detect issues like this

Detection approaches can include:

  • Static analysis rules identifying outbound requests constructed from request parameters
  • Code review checks for URL, host, scheme, port, redirect, and DNS-resolution validation
  • Tests covering private address ranges, alternate IP representations, redirects, and unexpected protocols
  • Runtime monitoring of proxy destinations, DNS resolutions, and outbound connections
  • Network policies that alert on or block application traffic to restricted address spaces
  • API gateway policies restricting proxy routes and permitted destination patterns

Automated security review tools may help identify data flows from HTTP inputs into server-side request libraries.

Detection approaches can include:

  • Static analysis rules identifying outbound requests constructed from request parameters
  • Code review checks for URL, host, scheme, port, redirect, and DNS-resolution validation
  • Tests covering private address ranges, alternate IP representations, redirects, and unexpected protocols
  • Runtime monitoring of proxy destinations, DNS resolutions, and outbound connections
  • Network policies that alert on or block application traffic to restricted address spaces
  • API gateway policies restricting proxy routes and permitted destination patterns

Automated security review tools may help identify data flows from HTTP inputs into server-side request libraries.

Sources

SourceLink
github.comgithub.com/ChatGPTNextWeb/NextChat/
github.comgithub.com/ChatGPTNextWeb/NextChat/issues/6813
github.comgithub.com/ChatGPTNextWeb/NextChat/pull/6884
vuldb.comvuldb.com/cve/CVE-2026-105238
vuldb.comvuldb.com/submit/975707
vuldb.comvuldb.com/vuln/413450
vuldb.comvuldb.com/vuln/413450/cti

Frequently asked

questions

Yes. The issue can generally be reached remotely when the affected proxy endpoint is exposed and an attacker can submit requests that influence the x-base-url value.

Not necessarily. The required access depends on whether the deployment protects the proxy route with authentication and authorization controls.

Treat destination URLs as untrusted, use an allowlist of approved targets, validate resolved addresses, restrict protocols and ports, and enforce network-level egress controls.

Review all server-side HTTP clients for attacker-controlled URL inputs, add SSRF-focused tests, monitor outbound destinations, and apply least-privilege network policies.

Yes. The issue can generally be reached remotely when the affected proxy endpoint is exposed and an attacker can submit requests that influence the x-base-url value.

Not necessarily. The required access depends on whether the deployment protects the proxy route with authentication and authorization controls.

Treat destination URLs as untrusted, use an allowlist of approved targets, validate resolved addresses, restrict protocols and ports, and enforce network-level egress controls.

Review all server-side HTTP clients for attacker-controlled URL inputs, add SSRF-focused tests, monitor outbound destinations, and apply least-privilege network policies.

Find out what's already
exploitable in your codebase.