/

CVE-2026-26322

Severity:

HIGH RISK

(7.6)

Server-Side Request Forgery (SSRF) in OpenClaw Gateway Tool

CVE-2026-26322

Analyzed

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918

Impact:

Server-Side Request Forgery and Internal Network Probing

Severity:

HIGH RISK

(7.6)

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

Prior to version 2026.2.14, OpenClaw's Gateway tool accepted tool-supplied gatewayUrl values without adequate validation, allowing callers to direct the OpenClaw host to initiate outbound WebSocket connections to arbitrary targets.

Under conditions where a caller can influence gatewayUrl and observe responses, this behavior can be abused for network reachability probing and, in some cases, further interaction with internal services that speak WebSocket.

Affected context

This vulnerability affects OpenClaw deployments that:

  • Use the Gateway tool or tools that indirectly pass gatewayUrl overrides, and
  • Allow authenticated operators, automation, or other callers to influence gatewayUrl, and
  • Run OpenClaw in environments where the host can reach internal or sensitive network targets (e.g., localhost services, private network ranges, cloud metadata endpoints).

In typical setups, only trusted operators or automation can trigger these tool calls; however, in deployments where tool invocation is exposed to less-trusted or external users, the risk expands to include semi-trusted or untrusted callers.

Exploit preconditions

  • Attack surface: Tool invocation paths that accept a gatewayUrl override, either directly or via higher-level tools.
  • Required access: Ability to invoke the affected tool(s) with attacker-controlled gatewayUrl values. This is usually limited to authenticated operators or trusted automation, unless the deployment explicitly exposes these capabilities more broadly.
  • Trigger point: Passing a crafted gatewayUrl that is subsequently used by the Gateway WebSocket client to establish an outbound connection.
  • Why exploitation is possible: The implementation trusted caller-supplied gatewayUrl without validating it against an allowlist of known-safe endpoints, protocols, or host/port combinations. As a result, the OpenClaw host could be instructed to attempt WebSocket connections to arbitrary locations, including internal or otherwise unreachable-from-the-internet services.

Why this happens

The root cause aligns with CWE-918: Server-Side Request Forgery (SSRF). The Gateway WebSocket client logic treated the tool-supplied gatewayUrl as a trusted endpoint and did not sufficiently constrain it to known gateway addresses or safe patterns.

Conceptually, this is an unvalidated remote endpoint selection issue: code that constructs outbound network requests (WebSocket connections in this case) accepts caller-controlled URLs without applying scheme, host, port, or path restrictions. When running on a host with access to private, loopback, or metadata networks, this pattern allows an attacker with request-injection capability to pivot through the server and probe or communicate with internal services that are not otherwise exposed.

Potential impact

  • The OpenClaw host may attempt connections to attacker-specified endpoints, including:
  • Localhost-only services running on the same machine
  • Internal/private network services (e.g., 10.x.x.x, 192.168.x.x, 172.16-31.x.x)
  • Cloud provider metadata or control-plane IPs
  • Callers who can see connection results may use the behavior for:
  • Network reachability and port probing via success/failure, error types, or timing
  • Limited banner or protocol interaction with internal WebSocket-speaking services
  • In specialized environments, if an internal WebSocket service processes messages in a sensitive way, this could contribute to:
  • Unauthorized interaction with internal APIs
  • Chaining with other vulnerabilities on internal services (e.g., misconfigured WebSocket endpoints)
  • Potential leakage of coarse-grained network topology information (which hosts or addresses the OpenClaw host can reach).

General mitigation guidance

Effective mitigation focuses on constraining outbound connection targets and treating caller-supplied URLs as untrusted:

  • Prefer a design where the Gateway client connects only to:
  • A fixed, configured gateway endpoint, or
  • A tightly constrained set of allowlisted hosts and ports.
  • Apply strict URL validation on any user- or tool-supplied network endpoint:
  • Enforce allowed schemes (e.g., ws:// / wss:// only).
  • Restrict to expected hostnames or IP ranges; reject private/loopback/metadata ranges unless explicitly required and carefully controlled.
  • Disallow embedded credentials, query strings, fragments, and non-root paths if they are not essential to the protocol.
  • Treat loopback and private network targets as sensitive resources:
  • Avoid exposing generic "connect to any host/port" capabilities via tool parameters.
  • Ensure any internal network access from OpenClaw follows the principle of least privilege.
  • Where possible, separate roles:
  • Use configuration-only mechanisms (not per-request input) to define gateway endpoints.
  • Avoid mixing operator-level configuration capabilities with routine tool invocation parameters.

How teams detect issues like this

Detection can combine code-centric and runtime perspectives:

  • Static analysis and code review:
  • Search for code paths where network/WebSocket clients accept caller-provided URLs or hosts without validation or allowlisting.
  • Flag patterns where:
  • URL strings are passed directly from tool parameters or request bodies into connection constructors.
  • There is no clear enforcement of allowed schemes, hosts, or ports.
  • Highlight functions that construct outbound connections using generic URL parameters in shared libraries or platform components.
  • Configuration and policy enforcement:
  • Define policies that require all outbound gateway connections to originate from configuration, not dynamic user input.
  • Use linters or security checks in CI to block changes that introduce new unvalidated network targets.
  • Runtime monitoring:
  • Monitor egress traffic from OpenClaw hosts for unusual or unexpected destinations (e.g., metadata IPs, atypical private ranges, non-standard ports).
  • Use network-level egress controls (firewalls, security groups) to block sensitive target ranges and log attempted access.

Sources

SourceLink
github.comgithub.com/openclaw/openclaw/commit/c5406e1d2434be2ef6eb4d26d8f1798d718713f4
github.comgithub.com/openclaw/openclaw/releases/tag/v2026.2.14
github.comgithub.com/openclaw/openclaw/security/advisories/GHSA-g6q9-8fvw-f7rf

Frequently asked

questions

Not by default. Exploitation requires the ability to invoke Gateway-related tools with a controllable gatewayUrl. In typical deployments, that capability is restricted to authenticated operators, trusted automation, or specifically provisioned environments. It becomes more exposed if a deployment allows less-trusted or external users to trigger these tool calls.

The attacker must be able to supply or influence gatewayUrl for a tool invocation path that flows into the Gateway WebSocket client. This usually means having operator-level access, automation control, or equivalent permissions in the OpenClaw environment. Without such access, arbitrary internet users cannot normally exploit the issue.

The most robust fix is to eliminate or heavily restrict dynamic endpoint selection: the Gateway client should connect only to predefined, configuration-driven endpoints or a tightly controlled allowlist. Any remaining URL parameters should undergo strict validation for scheme, host, port, and path, rejecting values that do not exactly match expected patterns.

Treat all caller-supplied network endpoints as untrusted input. Enforce allowlists for outbound connections, avoid generic "URL pass-through" parameters for network clients, and use security reviews or automated checks to flag any code paths where user-controlled data influences host, port, or protocol selection. Additionally, complement application-level protections with network egress controls to limit the blast radius of any SSRF-like behavior.

Find out what's already
exploitable in your codebase.