Component
forge-core (registry, tools, security, channels, LLM), forge-cli (commands, TUI wizard, runtime)
Description
Six critical security vulnerabilities identified via cross-reference with OpenClaw 2026.2.19 / 2026.2.20. These are actively present and exploitable without special conditions.
Re-verified 2026-03-12 against latest main (commit 7d2148b). All 6 vulnerabilities confirmed present.
Reference: FORGE-SECURITY-UPDATE.md — Phase 1
Steps to reproduce
C-1. IPv4 SSRF Bypass (Octal / Hex / Short / Packed Forms)
- Files:
forge-core/security/egress_enforcer.go, forge-core/security/domain_matcher.go
domain_matcher.go uses strings.HasSuffix() and map lookups for domain matching. No IPv4 normalization exists. net.ParseIP() silently accepts octal (0177.0.0.1), hex (0x7f.0.0.1), and packed forms, bypassing the allowlist.
C-2. NAT64 / 6to4 / Teredo IPv6 Transition Address Bypass
- File:
forge-core/security/egress_enforcer.go
- No checks for IPv6 transition addresses that embed private IPv4 destinations. An attacker can use
64:ff9b::127.0.0.1 (NAT64), 2002:7f00:0001:: (6to4), or Teredo addresses to reach internal services.
C-3. Cross-Origin Redirect Credential Stripping
- File:
forge-core/tools/builtins/http_request.go
- HTTP client created at lines 70-73 with only
Transport and Timeout. No custom CheckRedirect function. No imports for redirect handling. Cookie, Cookie2, and Proxy-Authorization headers survive cross-origin redirects.
C-4. A2A Server CORS Wildcard
- File:
forge-cli/server/a2a_server.go (line 238)
w.Header().Set("Access-Control-Allow-Origin", "*") allows access from any origin. No origin validation or dynamic origin checking.
C-5. A2A Server Authentication Not Enforced by Default
- File:
forge-cli/server/a2a_server.go
- An
authMiddleware field exists in ServerConfig and is applied at line 128, but it is optional (if s.authMiddleware != nil). Authentication is not enforced by default — servers can be instantiated without any auth.
C-6. A2A Server Missing Security Headers
- File:
forge-cli/server/a2a_server.go
- Only CORS headers (
Access-Control-*), Content-Type, Cache-Control, and Connection are set. Missing: X-Content-Type-Options, Referrer-Policy, X-Frame-Options, Content-Security-Policy.
Expected behavior
- C-1: All IPv4 literals normalized to strict dotted-decimal before allowlist comparison. Non-standard forms rejected.
- C-2: IPv6 transition addresses (NAT64, 6to4, Teredo) blocked by egress enforcer.
- C-3:
Authorization, Proxy-Authorization, Cookie, Cookie2 headers stripped on cross-origin redirects.
- C-4: CORS restricted to explicit origin allowlist (default: localhost only).
- C-5: Authentication middleware required — server fails to start without auth configured.
- C-6: Security headers (
X-Content-Type-Options: nosniff, Referrer-Policy: no-referrer, X-Frame-Options: DENY, CSP: default-src 'none') set on all responses.
Actual behavior
- C-1: Octal/hex/packed IPv4 forms bypass the egress enforcer.
- C-2: IPv6 transition addresses pass through unchecked.
- C-3: Credentials forwarded to arbitrary redirect targets.
- C-4: CORS is wildcard
* — any website can make cross-origin requests.
- C-5: Auth middleware is optional; servers can run without authentication.
- C-6: No security response headers present.
Tasks
C-1. IPv4 SSRF Bypass
C-2. IPv6 Transition Address Bypass
C-3. Cross-Origin Redirect Credential Stripping
C-4. CORS Wildcard
C-5. Authentication Enforcement
C-6. Security Headers
Component
forge-core (registry, tools, security, channels, LLM), forge-cli (commands, TUI wizard, runtime)
Description
Six critical security vulnerabilities identified via cross-reference with OpenClaw 2026.2.19 / 2026.2.20. These are actively present and exploitable without special conditions.
Reference:
FORGE-SECURITY-UPDATE.md— Phase 1Steps to reproduce
C-1. IPv4 SSRF Bypass (Octal / Hex / Short / Packed Forms)
forge-core/security/egress_enforcer.go,forge-core/security/domain_matcher.godomain_matcher.gousesstrings.HasSuffix()and map lookups for domain matching. No IPv4 normalization exists.net.ParseIP()silently accepts octal (0177.0.0.1), hex (0x7f.0.0.1), and packed forms, bypassing the allowlist.C-2. NAT64 / 6to4 / Teredo IPv6 Transition Address Bypass
forge-core/security/egress_enforcer.go64:ff9b::127.0.0.1(NAT64),2002:7f00:0001::(6to4), or Teredo addresses to reach internal services.C-3. Cross-Origin Redirect Credential Stripping
forge-core/tools/builtins/http_request.goTransportandTimeout. No customCheckRedirectfunction. No imports for redirect handling.Cookie,Cookie2, andProxy-Authorizationheaders survive cross-origin redirects.C-4. A2A Server CORS Wildcard
forge-cli/server/a2a_server.go(line 238)w.Header().Set("Access-Control-Allow-Origin", "*")allows access from any origin. No origin validation or dynamic origin checking.C-5. A2A Server Authentication Not Enforced by Default
forge-cli/server/a2a_server.goauthMiddlewarefield exists inServerConfigand is applied at line 128, but it is optional (if s.authMiddleware != nil). Authentication is not enforced by default — servers can be instantiated without any auth.C-6. A2A Server Missing Security Headers
forge-cli/server/a2a_server.goAccess-Control-*),Content-Type,Cache-Control, andConnectionare set. Missing:X-Content-Type-Options,Referrer-Policy,X-Frame-Options,Content-Security-Policy.Expected behavior
Authorization,Proxy-Authorization,Cookie,Cookie2headers stripped on cross-origin redirects.X-Content-Type-Options: nosniff,Referrer-Policy: no-referrer,X-Frame-Options: DENY,CSP: default-src 'none') set on all responses.Actual behavior
*— any website can make cross-origin requests.Tasks
C-1. IPv4 SSRF Bypass
normalizeIPv4()function — re-format to strict dotted-decimalisAllowed()C-2. IPv6 Transition Address Bypass
isIPv6TransitionAddress(ip net.IP) boolchecking NAT64, 6to4, Teredo prefixesC-3. Cross-Origin Redirect Credential Stripping
CheckRedirectfunction onhttp.Clienthttptestcross-origin redirect serverC-4. CORS Wildcard
*with explicit configurable origin allowlisthttp://localhost:*for local useAccess-Control-Allow-Credentials: falseexplicitlyC-5. Authentication Enforcement
0600permissions401C-6. Security Headers
X-Content-Type-Options: nosniff,Referrer-Policy: no-referrer,X-Frame-Options: DENY,CSP: default-src 'none'