The vulnerability, identified as GHSA-fwjq-xwfj-gv75, involves a bypass of session visibility controls in the session_status tool within the OpenClaw platform. By analyzing the provided fix commit 4d369a3400dc9b737fbe8daa63f09d909ce7beb8, I was able to pinpoint the exact location of the flaw.
The patch modifies the createSessionStatusTool function in src/agents/tools/session-status-tool.ts. The key change is the removal of a conditional statement that previously wrapped the visibilityGuard.check. Before the fix, this check was only triggered for sandboxed calls or when a session was looked up by its ID. This meant that for any unsandboxed call that specified a session key directly, the visibility check was skipped entirely, allowing a user to view session statuses that should have been restricted by the tools.sessions.visibility configuration.
The vulnerable function is therefore createSessionStatusTool, as it contained the flawed logic that failed to enforce authorization checks in all necessary cases. An attacker could exploit this by crafting a call to the session_status tool from within a non-sandboxed environment to illegitimately access information about other sessions.