T08 · Insecure Dependencies
Error
- Location
- SKILL.md:69
- Finding
- Unpinned Third-Party Packages Can Execute with Wallet-Signing Access<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:69`, `SKILL.md:88`, and `SKILL.md:711-721` **Vulnerability Type**: Unpinned and automatically executed third-party dependencies **Risk Level**: High ### Vulnerable Code ```bash npm install @ponzu_app/sdk viem ``` ```bash npm install viem ``` ```json { "mcpServers": { "ponzu": { "command": "npx", "args": ["-y", "@ponzu_app/mcp"], "env": { "PONZU_NETWORK": "mainnet" } } } } ``` The documentation subsequently instructs users to grant signing capability: ```text Add PONZU_PRIVATE_KEY for signing capability. ``` ### Technical Analysis The installation commands do not pin package versions or integrity hashes. Consequently, the installed implementation can change between executions without any corresponding change to the reviewed Skill file. The optional MCP configuration is particularly risky because `npx -y` can retrieve and execute the current registry version of `@ponzu_app/mcp` without an interactive installation confirmation. The documentation also directs users to expose `PONZU_PRIVATE_KEY` to this MCP server when transaction signing is required. Package installation and `npx` execution can run package code locally, including package lifecycle scripts and transitive dependencies. If the package publisher, registry account, package contents, or dependency tree is compromised, the retrieved code could access environment variables and perform arbitrary actions with the privileges of the invoking user. ### Attack Path 1. An attacker compromises the publisher account, package release process, or a transitive dependency for `@ponzu_app/sdk`, `@ponzu_app/mcp`, or `viem`. 2. The attacker publishes a malicious version under the expected package name. 3. A user follows the Skill and runs an unpinned `npm install`, or the agent starts the MCP server using `npx -y`. 4. The package manager retrieves and executes the malicious current version. 5. If signing ...[truncated 827 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin every direct package to an exact, reviewed version rather than a floating version. 2. Commit and enforce a package lockfile with integrity metadata. 3. Replace `npx -y @ponzu_app/mcp` with an explicitly installed and version-pinned package, such as a reviewed exact release. 4. Use `npm ci` in controlled environments and reject unexpected lockfile changes. 5. Audit package provenance, signatures, lifecycle scripts, maintainers, and transitive dependencies before granting wallet access. 6. Run the MCP server in a restricted process or container with minimal filesystem and network permissions. 7. Use a dedicated low-value wallet and avoid exposing a raw private key where hardware-wallet or constrained signing mechanisms are available. 8. Add transaction policy controls that restrict destination contracts, chain ID, value, and permitted function selectors. 9. Require explicit human confirmation before signing value transfers, approvals, deployment transactions, or other high-impact operations. ]]>
