The vulnerability lies in the handling of HTTP error responses when fetching remote media. The openclaw library did not enforce a size limit when reading the body of these error responses. Specifically, the readErrorBodySnippet function in src/media/fetch.ts used await res.text(), which reads the entire response body into memory. This function is called by fetchRemoteMedia when an HTTP request for media fails.\n\nAn attacker could exploit this by hosting a malicious file and, when the openclaw server attempts to fetch it, returning an HTTP error with an extremely large response body. This would cause the server to consume an excessive amount of memory, potentially leading to a denial-of-service (DoS) attack.\n\nThe patch addresses this by replacing the unbounded read with a new function, readResponseTextSnippet, which reads only a limited prefix of the response body (e.g., the first 8KB). This ensures that even malicious error responses cannot cause unbounded memory allocation. The primary vulnerable function is readErrorBodySnippet due to the direct use of res.text(), and fetchRemoteMedia is the entry point that triggers the vulnerable code path.