The vulnerability is a path traversal issue in OpenClaw, where the application mishandles '@-prefixed' absolute paths. The security advisory GHSA-27cr-4p5m-74rj states that this allowed bypassing workspace boundary checks. The core of the issue is that path validation was performed before path canonicalization, meaning the path was checked for safety and then later modified by the runtime in a way that changed its meaning from a relative path to an absolute one.
The analysis of the patch commit 9ef0fc2ff8fa7b145d1e746d6eb030b1bf692260 confirms this. The changes are centered around normalizing paths by stripping the '@' prefix before they are used or validated. Two functions were identified as being vulnerable:
-
mapContainerPathToWorkspaceRoot in src/agents/pi-tools.read.ts: This function is used by tools to map paths. The patch explicitly adds logic to remove the '@' prefix. Before the fix, it would pass the raw path to the validation logic, leading to the bypass.
-
expandPath in src/agents/sandbox-paths.ts: This is a more generic path utility function. It was also patched to handle the '@' prefix, indicating that this vulnerability could be triggered through multiple code paths that rely on this function for path resolution.
During an exploit, an attacker would supply a path like '@/etc/passwd' to a tool, for instance, a file reading tool. This would cause mapContainerPathToWorkspaceRoot or expandPath to be called. These functions would, before the patch, fail to normalize the path, leading to the security check being performed on the wrong path representation. Therefore, these two functions are the key indicators of this vulnerability being triggered and would appear in a runtime profile of an exploit.