Description
ProcessRunner builds a shell command string by concatenating arguments that include user- or config-provided values (model, allowed/disallowed tools) and executes it via `sh -c`. If any of those values can be influenced externally (e.g., via API settings or config), shell metacharacters will be interpreted, enabling arbitrary command execution. This is a realistic risk because the API already has model-validation gaps elsewhere, so the assumption that model/tool names are safe may not hold. Confirm by tracing where `options.model` and tool lists come from and whether they are strictly validate
Suggested Fix
Avoid shells entirely: spawn the CLI directly with an арг array and pipe the prompt file to stdin (e.g., `spawn(claudePath, args, { stdio: [...] })` + `fs.createReadStream(promptFile).pipe(proc.stdin)`). If shell use is unavoidable, strictly validate `model`, `allowedTools`, and `disallowedTools` against a whitelist and reject any unexpected characters.
ID: 0781039d
Category: Security
Project: viberails
Source: Manual
Detected: 2/2/2026