spec-kit
Fail
Audited by Gen Agent Trust Hub on Feb 16, 2026
Risk Level: CRITICALCOMMAND_EXECUTIONREMOTE_CODE_EXECUTION
Full Analysis
- [COMMAND_EXECUTION] (CRITICAL): Arbitrary command execution via
evalin bash scripts.\n - Evidence: In
scripts/common.sh, theget_feature_pathsfunction constructs shell variable assignments by interpolating the$current_branchvariable directly into single-quoted strings within a heredoc (cat <<EOF). This output is then executed usingeval $(get_feature_paths)inscripts/check-prerequisites.sh(line 88) andscripts/setup-plan.sh(line 28).\n - Vulnerability: The
$current_branchvariable is sourced from theSPECIFY_FEATUREenvironment variable, the current git branch name, or directory names in thespecs/folder. An attacker can inject arbitrary commands by including a single quote in these inputs (e.g.,SPECIFY_FEATURE="' ; id ; '"). This breaks the shell quoting in the generated string, causing the injected command to be executed during theevalcall.\n- [REMOTE_CODE_EXECUTION] (CRITICAL): The command injection vulnerability provides a direct path to arbitrary code execution. This is especially dangerous for AI agent skills, which may be directed to work on repositories containing maliciously crafted branch names or folder structures, or may be persuaded to set environment variables.\n- [COMMAND_EXECUTION] (MEDIUM): The scripts perform various file system operations (mkdir -p,cp,touch) using paths ($FEATURE_DIR,$IMPL_PLAN, etc.) derived from the same unsanitized input, which could be exploited for arbitrary directory creation or file manipulation even without theevalexploit.
Recommendations
- AI detected serious security threats
Audit Metadata