The vulnerability is a classic path traversal issue affecting file download and trace functionalities in OpenClaw. The root cause is the lack of input sanitization on file paths provided by the user through specific API endpoints.
The analysis of the patch commit 7f0489e4731c8d965d78d6eac4a60312e46a9426 reveals that the route handlers for /wait/download, /download (in src/browser/routes/agent.act.ts), and /trace/stop (in src/browser/routes/agent.debug.ts) were accepting a path parameter from the request body and using it directly for file operations. This allowed an authenticated user to use '..' sequences in the path to navigate outside the intended temporary directories and write files to arbitrary locations on the server's filesystem.
The patch introduces a new function, resolvePathWithinRoot, which is now used by all the affected route handlers to validate and sanitize the user-provided path, ensuring it resolves to a location within the designated root directory. The functions waitForDownloadViaPlaywright, downloadViaPlaywright, and traceStopViaPlaywright are the downstream functions that actually perform the file writing and would appear in a runtime profile during exploitation, even though the primary vulnerability logic was in the calling route handlers.