The vulnerability allowed an unauthenticated local attacker to execute arbitrary code by sending a malicious configuration through the config.apply WebSocket endpoint. The root cause was that the server did not strictly validate the configuration, allowing an attacker to inject an unsafe cliPath value, which was later used for command execution.
The analysis of the commits between the vulnerable and patched versions revealed that the fix involved enforcing strict schema validation. The primary evidence was found in commit d1e9490f95e0474e41d3718a2a44268a2d33128d, where the Zod schemas for the configuration were updated to be strict, rejecting any unknown properties. This prevents the injection of malicious fields like cliPath.
The vulnerable function is the handler for the config.apply WebSocket message. While the function itself is not directly visible in the patch, its existence is confirmed by the vulnerability description, and the fix is clearly visible in the validation logic it uses. As a defense-in-depth measure, the ensureConfigReady function was also updated to prevent the application from starting with an invalid configuration.
Additionally, commit daceeaa24c044dcffec038bc2ce6c0d4fedb4664 improved the error reporting for validation failures, further confirming the focus on stricter validation as the solution.