The vulnerability, GHSA-qrp5-gfw2-gxv4, is a tool policy bypass in OpenClaw. The root cause was that bundled MCP (Mission Control Protocol) and LSP (Language Server Protocol) tools were not being filtered by the same security policies as core tools. My analysis of the fix commit, 0e7a992d3f3155199c1acc2dd9a53c5b3a4d3ada, reveals two main points of failure.
First, in the runEmbeddedAttempt and compactEmbeddedPiSessionDirect functions, the list of effective tools was assembled by simply concatenating the core tools with the bundled tools. This happened before any policy filtering was applied to the bundled tools, effectively allowing them to bypass any configured allow/deny lists, owner-only restrictions, or sandbox policies.
Second, a related authorization vulnerability was found in the sendHandlers.message.action gateway method. This method trusted a user-provided senderIsOwner flag, which could be manipulated by a non-admin user to gain access to restricted, owner-only tools. The patch hardens this by validating the caller's administrative scope on the server side before honoring the senderIsOwner flag.
The fix involves introducing a new function, applyFinalEffectiveToolPolicy, which is now explicitly called to filter the bundled tools before they are added to the effective toolset in both runEmbeddedAttempt and compactEmbeddedPiSessionDirect. This ensures that all tools, regardless of their source, are subjected to the same rigorous policy checks.