Severity:

HIGH RISK

(7.3)

SSRF in HyperChat AI Proxy Middleware

CVE-2026-7223

Deferred

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918

Impact:

Server-Side Request Forgery with potential internal network access and data exposure

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

HyperChat's AI Proxy Middleware contains a server-side request forgery (SSRF) flaw in its fetch function, where the baseurl argument can be manipulated by an attacker.

When exploited remotely, this allows crafted requests to be proxied by the server to arbitrary destinations that the attacker selects, potentially reaching internal services not otherwise exposed.

Affected context

The vulnerability exists in BigSweetPotatoStudio HyperChat up to version 2.0.0-alpha.63 within the AI Proxy Middleware (packages/core/src/http/aiProxyMiddleware.mts).

It manifests when the middleware accepts or derives a baseurl value from client-controlled input and then uses it to build outbound HTTP requests without robust validation or restriction.

Deployments where the HyperChat server can reach internal hosts, cloud metadata endpoints, or other sensitive services are at particular risk.

Exploit preconditions

  • Attack surface: Remote HTTP interface exposed by the AI Proxy Middleware.
  • Required access: Ability to send crafted requests to endpoints that invoke the middleware's fetch logic (typically standard user-level or anonymous web/API access).
  • Trigger point: Supplying a malicious baseurl (or parameters that influence it) so that the middleware issues an outbound request to an attacker-chosen URL.
  • Why exploitation is possible: The fetch function trusts the baseurl value without enforcing strict allowlists, scheme checks, or network egress controls, enabling attacker-controlled destinations to be requested from the server's network context.

Why this happens

This issue stems from insufficient validation and normalization of user-influenced URLs used for server-side HTTP requests.

The AI Proxy Middleware's fetch function uses a baseurl argument that can be controlled or influenced by clients, and passes it directly (or with minimal checks) into HTTP request logic.

This aligns with CWE-918: Server-Side Request Forgery (SSRF), where the server becomes an unwitting proxy, leveraging its own network position and trust relationships to reach targets that the attacker cannot access directly.

Potential impact

  • May allow access to internal services (e.g., internal APIs, admin panels, databases, or message brokers) not otherwise exposed to the internet.
  • Could enable interaction with cloud provider metadata services, potentially leaking credentials or configuration data.
  • Can leak sensitive response data (tokens, secrets, configuration, or user data) returned by internal endpoints.
  • Might be used to pivot within the infrastructure, assisting in reconnaissance and further attacks.
  • Could facilitate partial denial-of-service against internal resources by directing high volumes of proxy requests at them.

General mitigation guidance

Effective mitigation focuses on treating outbound destinations as untrusted when influenced by client input and strictly limiting where the server can connect:

  • Introduce strict allowlists of permitted upstream hosts and paths for the AI Proxy Middleware; reject or ignore any baseurl not on the allowlist.
  • Enforce scheme and hostname validation, allowing only expected protocols (e.g., https) and forbidding link-local, loopback, private network, and metadata IP ranges.
  • Normalize and parse URLs using robust libraries, then validate the parsed components before issuing requests.
  • Apply network-level egress controls (firewalls, security groups, service meshes) so the application cannot freely call internal or high-risk endpoints.
  • Limit the information returned from proxied responses, avoiding reflection of raw internal error messages or sensitive headers to clients.
  • Design the middleware with a fixed set of upstream AI providers configured server-side, avoiding patterns where the client can fully control the target URL.

How teams detect issues like this

Identifying and monitoring SSRF risks in components like the AI Proxy Middleware typically involves:

  • Static analysis rules that flag direct use of user-influenced URL parameters (baseurl, url, endpoint) passed into HTTP client APIs without validation or allowlisting.
  • Code review checklists that require verification of URL normalization, scheme checks, and host/IP restriction logic around any server-initiated HTTP requests.
  • Configuration and policy enforcement that disallow dynamic upstream configuration from user input for proxy-like components.
  • Runtime monitoring and logging of outbound HTTP requests, including destination host/IP, and alerting on anomalous patterns such as connections to internal IP ranges or metadata endpoints.
  • Leveraging automated security testing or DAST tools that attempt to coerce the server into calling controlled SSRF test endpoints to verify defenses.

Sources

SourceLink
github.comgithub.com/BigSweetPotatoStudio/HyperChat/
github.comgithub.com/BigSweetPotatoStudio/HyperChat/issues/142
vuldb.comvuldb.com/submit/802265
vuldb.comvuldb.com/vuln/359823
vuldb.comvuldb.com/vuln/359823/cti

Frequently asked

questions

The vulnerability can be exploited remotely by anyone who can reach the HyperChat endpoints that trigger the AI Proxy Middleware. However, the real impact depends on what internal or external services the server can access from its network environment.

Not necessarily. If the affected endpoints are publicly accessible, an unauthenticated attacker may be able to exploit the issue. If they are behind authentication, then any user who can invoke the proxy functionality could potentially abuse it.

The most robust fix is to stop trusting user-controlled URLs and instead use server-side configuration to define a small set of allowed upstream services. Implement strict allowlists, normalize and validate URLs, and block access to private, loopback, and metadata addresses before issuing any outbound requests.

When designing proxy or integration features, separate who chooses the destination from where the server is allowed to connect. Avoid patterns where clients can directly supply full URLs, enforce strong validation and allowlists for any remote call, and complement application-level checks with network egress policies and routine security review of new HTTP client usage.

Find out what's already
exploitable in your codebase.