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.

