T09 · Insecure Skill Coding Practices
- Location
usage-dashboard/server.mjs:27- Finding
Shell Command Injection Through Configurable 1Password Item IDs
- Content
View full analysis
/dev/null`, { encoding: "utf-8", timeout: 10000 } ); ``` ### Technical Analysis The configurable `itemId` value is interpolated directly into a command executed through a system shell. It is neither quoted nor validated before reaching `execSync`. The project documentation instructs users to replace the placeholder item IDs in the `ACCOUNTS` object. If an attacker can influence one of these values—for example, through a malicious configuration example or modified project copy—shell metacharacters such as `;`, `|`, command substitution, or redirection will be interpreted as shell syntax. The legitimate task only requires passing an item identifier to the `op` executable. Invoking a shell exceeds that requirement and unnecessarily creates a command-execution channel. ### Attack Path 1. An attacker supplies or recommends a crafted 1Password item ID, such as an identifier followed by a shell command. 2. The victim places that value in the `ACCOUNTS` configuration. 3. The victim launches the dashboard and requests usage information. 4. `getTokenFrom1Password()` interpolates the crafted value into the shell command. 5. The shell executes the injected command with the permissions of the dashboard process. ### Impact Assessment Successful exploitation provides arbitrary command execution under the operating-system account running the dashboard. The attacker could: - Read Claude and OpenClaw credentials accessible to the user. - Modify files in the user's home directory. - Alter OpenClaw configuration or authentication profiles. - Install user-level persistence. - Exfiltrate other locally accessible information. The vulnerabili ...[truncated 139 chars]- Remediation
View remediation
