The vulnerability exists in the openclaw package and allows an attacker to read arbitrary files from the host system and write them to a remote SSH target. This is due to a lack of validation for symbolic links in the uploadDirectoryToSshTarget function located in src/agents/sandbox/ssh.ts.
The patch introduces a new function, assertSafeUploadSymlinks, which is called at the beginning of uploadDirectoryToSshTarget. This new function recursively scans the directory to be uploaded and verifies that no symbolic links point outside of the directory's root. If an escaping symlink is found, an error is thrown, and the upload process is aborted.
The vulnerable function is uploadDirectoryToSshTarget because it was the function that handled the directory upload without proper validation. During an exploit, this function would be present in the runtime profile or stack trace as it processes the malicious directory.