T09 · Insecure Skill Coding Practices
- Location
SKILL.md:185- Finding
Shell Command Injection Through Weak Proxy Address Validation
- Content
View full analysis
" ``` ``` ### Technical Analysis `PROXY_ADDRESS` is supplied by the user, but the Skill only verifies that it starts with `0x` and contains exactly 42 characters. These checks do not ensure that the remaining 40 characters are hexadecimal digits. The value is then substituted directly into an unquoted command string. Because the command already uses shell syntax (`&&`), a crafted value containing shell metacharacters, command substitution, separators, or redirection operators may be interpreted as command syntax rather than as a single address argument. The TypeScript script also does not independently validate the address with `ethers.isAddress()` before passing it to the contract factory: ```typescript const proxy = Api3ReaderProxyV1__factory.connect(proxyAddress, provider); ``` Validation in documentation alone is therefore the only boundary protecting this command. ### Attack Path 1. The Skill asks the user to provide a Reader Proxy address. 2. A malicious or compromised user supplies a 42-character string beginning with `0x` that contains shell control syntax. 3. The documented prefix-and-length checks accept the value because they do not enforce hexadecimal content. 4. The Agent substitutes the value into the unquoted `exec ...[truncated 823 chars]- Remediation
View remediation
