NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · OpenClaw

CVE-2026-22181: OpenClaw's web tools strict URL guard could lose DNS pinning when env proxy is configured

mediumCVSS 4.0 6.1GHSA-8mvx-p2r9-r375

OpenClaw up to 2026.3.1 could lose DNS pinning in web_fetch and citation redirect resolution when HTTP_PROXY, HTTPS_PROXY or ALL_PROXY is set. A URL checked against the SSRF guard could be routed through the proxy instead, reaching internal targets. Upgrade the npm package openclaw to 2026.3.2.

Published Mar 3, 2026 · Updated Mar 19, 2026 · Analysis Oct 31, 2026

What an attacker can do

The SSRF guard resolves a hostname and checks it against policy, then picks a request dispatcher. With proxy environment variables present, strict web-tool flows used EnvHttpProxyAgent rather than the DNS-pinned dispatcher. The destination that passed the check was therefore not the destination the connection went to. That is the check-time versus connect-time gap behind the TOCTOU and SSRF classification.

The attacker needs to get a URL in front of the agent's web tools: a prompt, a web page or a document the agent processes, or a redirect that web_fetch follows. With a proxy configured, that URL can reach internal or private hosts that the proxy can reach, such as cloud metadata services or admin interfaces. The agent returns the response, so the data can leak into the conversation. Deployments without proxy variables set are not affected. The CVSS 4.0 vector rates confidentiality high.

Who is affected

npm package openclaw, versions up to and including 2026.3.1, when the OpenClaw runtime process has HTTP_PROXY, HTTPS_PROXY or ALL_PROXY set (lowercase variants included). Check both:

npm ls openclaw
env | grep -i proxy

Run the second command in the environment that launches OpenClaw.

openclaw

Ecosystem
npm
Affected
<= 2026.3.1
Fixed in
2026.3.2
Check
npm ls openclaw

How to fix it

Upgrade to openclaw 2026.3.2 (fix commit 345abf0b2e0f43b0f229e96f252ebf56f1e5549e).

npm install [email protected]

The fix keeps DNS pinning on strict, untrusted web-tool URL paths. Env-proxy behavior is limited to trusted, operator-controlled endpoints behind an explicit dangerous opt-in.

Before upgrading, the advisory suggests clearing proxy environment variables for the OpenClaw runtime process, or disabling web_fetch and web_search where untrusted URL input is possible.

How to tell if you were hit

Check proxy logs for requests from the OpenClaw host to internal addresses, link-local metadata addresses or private hostnames, and match them to web_fetch calls in the agent logs. Beam records agent tool calls and its rules can flag fetches of internal addresses, which narrows down which prompt caused one.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

openclaw web tools strict URL fetch paths could lose DNS pinning when environment proxy variables are configured (HTTP_PROXY/HTTPS_PROXY/ALL_PROXY, including lowercase variants).

In affected builds, strict URL checks (for example web_fetch and citation redirect resolution) validated one destination during SSRF guard checks, but runtime connection routing could proceed through an env-proxy dispatcher.

Affected Packages / Versions

  • Package: openclaw (npm)
  • Vulnerable version range: <= 2026.3.1
  • Latest published npm version at triage time (2026-03-02): 2026.3.1
  • Patched versions: >= 2026.3.2 (released)

Technical Details

The SSRF guard performed hostname resolution and policy checks, then selected a request dispatcher.

When env proxy settings were present, strict web-tool flows could use EnvHttpProxyAgent instead of the DNS-pinned dispatcher. This created a destination-binding gap between check-time resolution and connect-time routing.

The fix keeps DNS pinning on strict/untrusted web-tool URL paths and limits env-proxy bypass behavior to trusted/operator-controlled endpoints via an explicit dangerous opt-in.

Impact

In deployments with env proxy variables configured, attacker-influenced URLs from web tools could be routed through proxy behavior instead of strict pinned-destination routing, which could allow access to internal/private targets reachable from that proxy environment.

Mitigations

Before upgrading, operators can reduce exposure by clearing proxy env vars for OpenClaw runtime processes or disabling web_fetch / web_search where untrusted URL input is possible.

Fix Commit(s)

  • 345abf0b2e0f43b0f229e96f252ebf56f1e5549e

Credited to tdjackey.

Questions

Does this affect OpenClaw without proxy variables?

No. The advisory ties the bypass to environment proxy settings being present, where EnvHttpProxyAgent replaced the DNS-pinned dispatcher.

Which tools are involved?

The strict URL fetch paths in the web tools, for example web_fetch and citation redirect resolution. The advisory also suggests disabling web_search as a mitigation.

What is the patched version of OpenClaw for CVE-2026-22181?

2026.3.2. Versions up to 2026.3.1 are vulnerable.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More OpenClaw vulnerabilities

All OpenClaw entries