/

CVE-2026-22181

Severity:

HIGH RISK

(7.6)

SSRF in OpenClaw Strict URL Fetch Paths

CVE-2026-22181

Modified

Vulnerability type

Category:

Server-Side Request Forgery (SSRF)

CWE:

CWE-918

Impact:

Unauthorized access to internal network resources via SSRF

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

OpenClaw versions prior to 2026.3.2 contain a DNS pinning bypass that allows attacker-controlled URLs to evade strict server-side request forgery (SSRF) protections when environment proxy variables are set.

By abusing HTTP_PROXY, HTTPS_PROXY, or ALL_PROXY configuration, requests can be routed through proxy behavior instead of the intended pinned destination, potentially granting access to internal services reachable from the proxy environment.

Affected context

This vulnerability affects OpenClaw deployments that:

  • Rely on "strict" or pinned-destination URL fetching to guard against SSRF, and
  • Run in environments where HTTP_PROXY, HTTPS_PROXY, or ALL_PROXY variables are configured, and
  • Accept or construct outbound URLs using user-influenced parameters.

In such contexts, outbound HTTP(S) traffic may follow proxy routing rules instead of the application's intended DNS pinning or destination restrictions, weakening SSRF defenses without obvious configuration errors.

Exploit preconditions

  • Attack surface: Application features or APIs that trigger outbound HTTP(S) requests (e.g., webhooks, URL fetchers, metadata downloaders) using OpenClaw's strict fetch paths.
  • Required access: Ability to influence or supply the target URL or portions of it through user input, API parameters, or indirectly via stored configuration.
  • Trigger point: Invocation of the strict URL fetch path while HTTP_PROXY, HTTPS_PROXY, or ALL_PROXY are set in the environment.
  • Why exploitation is possible: The URL routing logic trusts environment proxy configuration and can send traffic via the proxy before or instead of enforcing pinned-destination checks, allowing attacker-chosen URLs to reach internal or otherwise restricted endpoints accessible from the proxy's network position.

Why this happens

The core issue stems from a mismatch between the intended SSRF protection model (strict URL pinning) and the actual network routing behavior when proxy environment variables are honored.

Rather than enforcing destination constraints at the final network hop, OpenClaw's strict fetch paths rely on logic that can be bypassed when HTTP_PROXY, HTTPS_PROXY, or ALL_PROXY are present. The system effectively validates the URL against SSRF rules but then allows proxy routing to alter where the request ultimately goes. This aligns with CWE-918: Server-Side Request Forgery, where server-side network requests based on attacker-controlled input are insufficiently constrained, allowing access to internal or sensitive resources.

Potential impact

  • Access to internal HTTP(S) services that are reachable from the proxy, including admin panels, metadata services, or internal APIs.
  • Potential exfiltration of sensitive information exposed on internal endpoints (e.g., cloud instance metadata, configuration services).
  • Pivoting into internal networks for further reconnaissance through response-based probing.
  • Interaction with internal-only management interfaces that could lead to configuration tampering or further compromise, depending on the environment.

General mitigation guidance

Mitigation efforts should focus on decoupling SSRF protections from environment-dependent routing and minimizing implicit trust in proxy settings.

Common defensive patterns include:

  • Enforcing allowlists or explicit destination policies at the HTTP client layer that remain in effect regardless of proxy configuration.
  • Applying SSRF validation and network-level restrictions based on the effective outbound target (post-proxy), not just the original URL string.
  • Using dedicated, hardened HTTP clients for untrusted URL fetching that ignore or strictly control HTTP_PROXY, HTTPS_PROXY, and ALL_PROXY variables.
  • Isolating proxy-enabled fetch functionality from components that handle attacker-controlled URLs, or running them in separate, constrained runtime environments.
  • Applying least-privilege principles to proxies and network paths so that even if SSRF occurs, reachable internal surfaces are minimized.

How teams detect issues like this

Organizations can identify and monitor for this class of issue using:

  • Static analysis or code search to locate:
  • Outbound HTTP(S) calls that accept user-controlled URLs.
  • Uses of HTTP clients or libraries that implicitly honor environment proxy variables.
  • Code that claims to enforce "strict" or pinned destinations but does not account for proxy routing.
  • Code review checklists that explicitly ask:
  • Whether SSRF protections consider effective routing when proxies are present.
  • Whether URL validation and destination control are applied after all rewrites or indirections.
  • Runtime monitoring and logging such as:
  • Recording outbound destinations for requests triggered by user inputs and flagging when these traverse unexpected proxies or internal IP ranges.
  • Network-level policies (e.g., egress firewalls, service meshes) that alert on or block traffic from SSRF-prone components to sensitive internal ranges.
  • Use of automated security testing tools or fuzzers configured to vary URLs under different proxy configurations to detect routing discrepancies.

Sources

SourceLink
github.comgithub.com/openclaw/openclaw/commit/345abf0b2e0f43b0f229e96f252ebf56f1e5549e
github.comgithub.com/openclaw/openclaw/security/advisories/GHSA-8mvx-p2r9-r375
vulncheck.comvulncheck.com/advisories/openclaw-dns-pinning-bypass-via-environment-proxy-configuration-in-web-fetch

Frequently asked

questions

Exploitability depends on having a feature that makes outbound HTTP(S) requests based on attacker-influenced URLs and running in an environment where proxy variables are set. In such setups, the issue can be exploited remotely through normal application interfaces.

Not necessarily. If public endpoints allow untrusted users to supply URLs (e.g., webhooks, link previewers, or import-from-URL features), anonymous users may exploit the flaw. In more restricted APIs, the attacker must have whatever level of access is required to reach the URL-accepting functionality.

The most robust approach is to apply strict SSRF controls that are independent of environment proxy configuration—enforce allowlists or explicit destination checks on the effective outbound target, and ensure any HTTP client used with untrusted URLs either ignores or tightly constrains HTTP_PROXY, HTTPS_PROXY, and ALL_PROXY.

Treat any feature that makes server-side network requests based on user input as high risk. Standardize a hardened outbound request utility that:

  • Enforces SSRF-safe destination policies.
  • Normalizes and validates URLs before use.
  • Controls or ignores proxy environment variables for untrusted traffic.

Combine this with regular security reviews of networked features and automated checks for SSRF-prone patterns.

Find out what's already
exploitable in your codebase.