The vulnerability consists of two related OS command injection issues in the SSH remote connection handling. The provided patch addresses one of these issues in the TypeScript codebase of the clawdbot npm package.\n\nThe primary vulnerable function is parseSshTarget in src/infra/ssh-tunnel.ts. This function was responsible for parsing an SSH target string but failed to prohibit hostnames starting with a dash (-). This allowed an attacker to craft a malicious SSH target like -oProxyCommand=..., which would be interpreted as a command-line option by the ssh client, leading to local command execution.\n\nThe patch rectifies this by adding a check in parseSshTarget to reject any hostname that begins with a dash.\n\nAdditionally, two other functions, startSshPortForward in src/infra/ssh-tunnel.ts and resolveSshConfig in src/infra/ssh-config.ts, were involved in the execution flow. These functions construct and spawn ssh commands. The patch hardens them by adding the -- argument before the user-supplied host. This ensures that any user input is treated as a positional argument (the hostname) and not as an option, even if it starts with a dash.\n\nThe function gatewayStatusCommand in src/commands/gateway-status.ts is also identified as it is a user-facing command that utilizes the vulnerable parseSshTarget function, making it an entry point for the exploit.\n\nThe vulnerability description also mentions a second vulnerability in a function named sshNodeCommand within a Swift file (CommandResolver.swift). However, the provided patch files do not contain any changes related to this function or file. The analysis is therefore based solely on the evidence present in the provided TypeScript patch, which addresses the SSH target handling vulnerability.