T08 · Insecure Dependencies
- Location
SKILL.md:29- Finding
Unpinned Runtime Package Executes with Access to a Wallet Private Key
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 29-34; also declared inskill.json, line 38
Vulnerability Type: Unpinned third-party dependency with access to sensitive wallet credentials
Risk Level: HighVulnerable Code
json { "mcpServers": { "payql": { "command": "npx", "args": ["-y", "payql"], "env": { "PAYQL_NETWORK": "base", "PAYQL_PRIVATE_KEY": "0xYOUR_BASE_WALLET_KEY" } } } }The same unpinned runtime command is declared in
skill.json:json "mcp": { "tools": [ "search_subgraphs", "get_payment_info", "query_subgraph", "get_subgraph_schema", "wallet_status" ], "transport": "stdio", "endpoint": "npx -y payql" }Technical Analysis
The Skill launches
payqlthroughnpx -ywithout specifying an exact package version or verifying artifact integrity. Consequently, npm resolves and executes whichever package version is current at installation or invocation time. The-yoption automatically accepts installation, eliminating an opportunity for the user to review the resolved package.The launched process is intentionally given
PAYQL_PRIVATE_KEY. This key can authorize EIP-3009 USDC transfers from the associated Base wallet. Any code executed by the package can read the environment variable, transmit the private key to a remote service, sign unauthorized payment authorizations, or otherwise spend funds available to that wallet.No evidence was found that the currently reviewed documentation itself exfiltrates the private key, and no malicious package implementation was included in the audited project. The vulnerability arises from executing a mutable, externally retrieved dependency with direct access to a spending credential. The documentation's recommendation to use a dedicated low-balance wallet limits potential losses but does not prevent credential co ...[truncated 1930 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace
npx -y payqlwith an exact, reviewed version such asnpx --yes payql@<audited-version>, and update it only through an explicit security review process. - Prefer installing the dependency ahead of time from a lockfile or immutable artifact rather than downloading executable code when the Skill starts.
- Verify package integrity using trusted registry metadata, checksums, signatures, provenance attestations, or a controlled internal package mirror.
- Do not expose the raw wallet private key to the MCP package. Use an isolated signer or managed wallet that keeps the key non-exportable and enforces destination allowlists, approved assets, per-query limits, cumulative spending limits, and expiration.
- Require explicit user approval before paid operations and verify that each signed authorization matches the displayed network, USDC contract, recipient, amount, nonce, and validity interval.
- Run the dependency in a sandbox with minimal filesystem and network access. Pass only required environment variables and remove unrelated inherited secrets.
- Retain the dedicated low-balance wallet guidance, but treat it as defense in depth rather than the primary control.
- If the existing key may have been exposed to an untrusted package version, stop using it, move remaining assets to a new wallet, and do not replenish the compromised address.
- Replace
