The vulnerability lies in the openclaw package's handling of media downloads from Tlon. The analysis of the provided patch commit 2194587d70d2aef863508b945319c5a7c88b12ce reveals two key functions involved in the vulnerability. The primary vulnerable function is downloadMedia in extensions/tlon/src/monitor/media.ts. Before the patch, this function would download a file from a provided URL and save it to disk without enforcing any size limits. This allowed a remote attacker to trigger the download of an arbitrarily large file, leading to disk space exhaustion and a denial of service. The patch addresses this by replacing the direct file streaming with a call to fetchRemoteMedia, which enforces a size limit (MAX_IMAGE_BYTES).
A secondary function, extractImageBlocks in the same file, contributed to the issue. This function extracts image URLs from messages. Prior to the fix, it did not limit the number of URLs it would extract. This allowed an attacker to amplify the attack by including many image URLs in a single message. The patch adds a limit to the number of images that can be processed per message, acting as a secondary defense mechanism. Therefore, both downloadMedia and extractImageBlocks would appear in a runtime profile during the exploitation of this vulnerability.