T09 · Insecure Skill Coding Practices
- Location
scripts/esxi-deploy.sh:20- Finding
Remote Command Injection Through Unvalidated Deployment Parameters
- Content
View full analysis
\"\$VM_DIR/${HOSTNAME}.vmx\" <&1 | tail -2 ``` ### Technical Analysis Command-line parameters and environment variables such as `HOSTNAME`, `CPU`, `RAM`, `DISK`, `ESXI_DATASTORE`, and `NETWORK` are not validated against restrictive allow lists. They are embedded in a large double-quoted string and transmitted to SSH, after which the ESXi shell parses that string as shell code. Local shell quoting does not make these values safe for the second parsing operation on the remote host. A value containing quote characters, command separators, command substitutions, newlines, or heredoc delimiters can escape its intended VMX or shell contex ...[truncated 1398 chars]- Remediation
View remediation
