The analysis is based on the provided commit d7c3210cd6f5fdfdc1beff4c9541673e814354d5, which is explicitly mentioned in the security advisory as the fix. The vulnerability describes a trust boundary violation where a user-controlled payload from a /hooks/wake endpoint is promoted to a trusted System: prompt channel. The fix is located in the fetchWithSsrFGuard function within src/infra/net/fetch-guard.ts, a function designed to prevent Server-Side Request Forgery (SSRF). The patch modifies the logic to skip DNS pinning when a trusted environment proxy is configured.
The reasoning connects these two seemingly disparate facts by hypothesizing that the vulnerability is triggered by an unhandled exception. Specifically, in the vulnerable version, fetchWithSsrFGuard would always attempt to resolve and pin the DNS for a given hostname. If OpenClaw is configured to use a trusted proxy, and a user provides a hostname in the wake payload that is only resolvable by that proxy, the initial DNS lookup would fail. This failure would throw an exception. It is inferred that the code handling the /hooks/wake functionality does not correctly handle this specific error case, leading it to erroneously process the original, un-sanitized payload as a trusted system command. The patch prevents this condition by aligning the code with the intended logic: if a trusted proxy is used, the responsibility of DNS resolution is delegated to it, and the problematic initial DNS lookup is skipped. Therefore, fetchWithSsrFGuard is identified as the key function, as its behavior is the trigger for the vulnerability, even if the root cause lies in the error handling of its caller.