The vulnerability is a Server-Side Request Forgery (SSRF) in the marketplace plugin download functionality of OpenClaw. The root cause is that the code responsible for downloading plugin archives from a URL followed HTTP redirects without validating the final redirected URL. This allowed an attacker to craft a URL that, when processed by the server, would redirect the request to an internal service, enabling the attacker to probe the internal network or access sensitive data.
The analysis of the patch 2ce44ca6a1302b166a128abbd78f72114f2f4f52 reveals that the function downloadUrlToTempFile in src/plugins/marketplace.ts was responsible for this download process. The original implementation was removed and replaced with a more robust version that now uses fetchWithSsrFGuard to get both the response and the finalUrl after redirects. The new code validates this finalUrl and implements other security measures like download size limits and timeouts.
Therefore, the primary vulnerable function is downloadUrlToTempFile. The function installPluginFromMarketplace is the entry point for this vulnerable workflow and would appear in a profiler's output during exploitation.