The vulnerability allowed an attacker to bypass an approval mechanism in OpenClaw when using pnpm dlx commands. An operator could approve a benign local script, but an attacker could modify the script's contents before execution without invalidating the approval. This was because the approval system did not correctly bind the approval to the script's content for pnpm dlx commands.
The root cause of this issue was located in the command parsing logic within the invoke-system-run-plan.ts file. The function unwrapPnpmExecInvocation was responsible for parsing pnpm commands but did not handle the dlx subcommand. Consequently, the higher-level function buildSystemRunApprovalPlan, which constructs the security approval plan, was not aware of the local script being executed and failed to create a content-based snapshot (mutableFileOperand) for it.
The patch addresses this by introducing logic within unwrapPnpmExecInvocation to specifically handle pnpm dlx commands, delegating the parsing to a new unwrapPnpmDlxInvocation function. This ensures that the local script is correctly identified, and its content is snapshotted as part of the approval plan, preventing any subsequent modifications from being executed under the original approval.