T03 · Remote Payload Retrieval and Execution
Error
- Location
- SKILL.md:10
- Finding
- Mutable Third-Party CLI Is Downloaded and Executed Without Version Pinning<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:10` **Vulnerability Type**: Remote execution of an unpinned third-party dependency **Risk Level**: High ### Vulnerable Code ```yaml allowed-tools: ["Bash(npx last-ai-standing-cli@latest *)", "Bash(las *)"] ``` ### Technical Analysis The allowed tool declaration authorizes execution of `last-ai-standing-cli@latest` through `npx`. The `latest` tag is mutable, so the package downloaded during a future invocation may differ from the package available when the Skill was reviewed. The repository contains no CLI source code, exact version pin, package lockfile, or integrity digest. Consequently, the behavior of the executable cannot be independently verified from the audited artifact. The `*` wildcard also permits every subcommand and argument supported by the package. Because the CLI is expected to have access to `BASE_PRIVATE_KEY` and to sign transactions involving real assets, compromise of the npm package or its publishing account would create a direct path to wallet theft and arbitrary local code execution. ### Attack Path 1. A user or agent loads the Skill and makes `BASE_PRIVATE_KEY` available in the environment as instructed. 2. An attacker compromises the npm package, its maintainer account, or its dependency chain. 3. The attacker publishes a malicious release under the mutable `latest` tag. 4. The agent invokes `npx last-ai-standing-cli@latest` through the allowed Bash capability. 5. The malicious package executes with the agent process's local permissions. 6. It reads the wallet key or requests malicious signatures and transfers wallet assets to an attacker-controlled address. 7. It may additionally inspect accessible files, environment variables, and network credentials or execute other operating-system commands. ### Impact Assessment Successful exploitation could expose the self-custodial wallet private key and permit irreversible theft of ETH, USDC, and other assets controlled by ...[truncated 329 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Replace `@latest` with an exact, reviewed package version. - Verify the package using a cryptographic integrity digest rather than trusting a mutable registry tag. - Include the CLI source, package manifest, and lockfile in the auditable artifact. - Restrict the tool allowlist to the minimum required subcommands and validated argument patterns instead of permitting `*`. - Run the CLI inside a sandbox with no access to unrelated files, credentials, sockets, or environment variables. - Use a dedicated low-value wallet and an isolated signing service that enforces chain, contract, recipient, method, and spending policies. - Require package updates to undergo a new security review before the approved version is changed. ]]>
