openclaw - 💡(How to fix) Fix web_fetch SSRF policy allowRfc2544BenchmarkRange not effective in 2026.5.12

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

The tools.web.fetch.ssrfPolicy.allowRfc2544BenchmarkRange configuration option, documented as a workaround for FakeIP/proxy environments, does not actually prevent SSRF blocking when accessing domains that resolve to RFC 2544 benchmark range (198.18.0.0/15) due to DNS hijacking/pollution.

Error Message

"status": "error", "error": "Blocked: resolves to private/internal/special-use IP address"

Root Cause

The SSRF guard appears to perform DNS resolution locally before the proxy request, blocking the request at the DNS resolution stage. The ssrfPolicy configuration may not be properly wired into the SSRF guard logic for web_fetch.

Fix Action

Workaround

Currently must use curl command-line tool instead of web_fetch for proxied requests:

curl -sL "URL" -x http://proxy:port

Code Example

{
  "proxy": {
    "enabled": true,
    "proxyUrl": "http://192.168.3.100:7897"
  },
  "tools": {
    "web": {
      "fetch": {
        "ssrfPolicy": {
          "allowRfc2544BenchmarkRange": true
        }
      }
    }
  }
}

---

await web_fetch({ url: "https://www.google.com", maxChars: 200 })

---

{
  "status": "error",
  "tool": "web_fetch",
  "error": "Blocked: resolves to private/internal/special-use IP address"
}

---

curl -sL "URL" -x http://proxy:port
RAW_BUFFERClick to expand / collapse

Bug Report: web_fetch SSRF policy allowRfc2544BenchmarkRange not effective in 2026.5.12

Summary

The tools.web.fetch.ssrfPolicy.allowRfc2544BenchmarkRange configuration option, documented as a workaround for FakeIP/proxy environments, does not actually prevent SSRF blocking when accessing domains that resolve to RFC 2544 benchmark range (198.18.0.0/15) due to DNS hijacking/pollution.

Environment

  • OpenClaw Version: 2026.5.12
  • OS: WSL2 (Ubuntu on Windows)
  • Network Setup: Proxy with DNS hijacking (Clash/Surge fake-ip mode)
  • Proxy URL: http://192.168.3.100:7897

Current Configuration

{
  "proxy": {
    "enabled": true,
    "proxyUrl": "http://192.168.3.100:7897"
  },
  "tools": {
    "web": {
      "fetch": {
        "ssrfPolicy": {
          "allowRfc2544BenchmarkRange": true
        }
      }
    }
  }
}

Steps to Reproduce

  1. Configure OpenClaw with a proxy that uses FakeIP/DNS hijacking (e.g., Clash, Surge, Mihomo)
  2. Add tools.web.fetch.ssrfPolicy.allowRfc2544BenchmarkRange: true to config
  3. Restart OpenClaw gateway
  4. Attempt to fetch a domain that requires proxy (e.g., Google, DuckDuckGo)
await web_fetch({ url: "https://www.google.com", maxChars: 200 })

Expected Behavior

With allowRfc2544BenchmarkRange: true, domains resolving to 198.18.0.0/15 (RFC 2544 benchmark range) should be allowed through when behind a trusted FakeIP proxy.

Actual Behavior

{
  "status": "error",
  "tool": "web_fetch",
  "error": "Blocked: resolves to private/internal/special-use IP address"
}

Root Cause Analysis

The SSRF guard appears to perform DNS resolution locally before the proxy request, blocking the request at the DNS resolution stage. The ssrfPolicy configuration may not be properly wired into the SSRF guard logic for web_fetch.

Verification

ToolCommandResult
curlcurl -s https://www.google.com -x http://192.168.3.100:7897✅ 200 OK
web_fetchweb_fetch({ url: "https://www.google.com" })❌ SSRF Blocked
web_fetchweb_fetch({ url: "https://httpbin.org/ip" })✅ Returns proxy IP (95.40.229.31)

The proxy is correctly configured and working (verified via httpbin.org), but web_fetch still blocks Google despite allowRfc2544BenchmarkRange: true.

Related Issues

  • #62178 - web_fetch still fails in FakeIP environments on 2026.4.5
  • #26847, #48080, #48961, #25215, #29669

Impact

Users in regions with DNS pollution (e.g., mainland China) who rely on proxy tools with FakeIP mode cannot use web_fetch for accessing international services like Google, DuckDuckGo, etc., even with the documented workaround enabled.

Workaround

Currently must use curl command-line tool instead of web_fetch for proxied requests:

curl -sL "URL" -x http://proxy:port

Suggested Fix

Either:

  1. Ensure ssrfPolicy.allowRfc2544BenchmarkRange is properly respected by web_fetch's SSRF guard
  2. Or defer SSRF checks until after proxy resolution (trust proxy to resolve real IPs)
  3. Or add a broader dangerouslyAllowPrivateNetwork option for trusted proxy environments

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix web_fetch SSRF policy allowRfc2544BenchmarkRange not effective in 2026.5.12