T09 · Insecure Skill Coding Practices
- Location
index.js:110- Finding
Wallet API Credential Exfiltration Through an Unvalidated Signing Endpoint
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a real GoodWallet trading skill, but it needs Review because it can sign broad on-chain actions with weak safeguards that could expose credentials or cause irreversible wallet mistakes.
Review carefully before installing. Use only testnet funds unless you have independently audited the package, avoid contract-call unless you can decode the calldata yourself, always specify exact approval amounts, do not rely on the documented slippage option for price protection, and do not set SIGN_URL or RPC_URL from untrusted shell profiles, wrappers, or CI environments.
index.js:110Wallet API Credential Exfiltration Through an Unvalidated Signing Endpoint
index.js:400DEX Swaps Disable Minimum-Output and Slippage Protection
index.js:328Unlimited ERC20 Allowance Is Granted by Default
index.js:24Wallet Operations Depend on Runtime-Loaded Third-Party Native Code
The documented behavior understates important security-relevant facts: external signing/relay communication, fixed testnet assumptions, and materially unsafe swap semantics where slippage is accepted but apparently not enforced and amountOutMin is zero. For a trading skill, these mismatches can cause users or agents to approve and sign transactions under false assumptions, leading to sandwiching, severe price loss, or execution on the wrong network/path.
The skill documents token transfers and swaps without clear warnings that blockchain transactions are irreversible, may incur gas costs, and can send assets to unrecoverable addresses. In a wallet-integrated context, missing warnings materially increase the chance of user error leading to permanent asset loss.
Documenting unlimited approvals as the default when no amount is provided, without a strong safety warning, encourages a dangerous permission pattern. If the spender contract is malicious, compromised, upgraded unexpectedly, or later exploited, it can drain all approved tokens without further consent.
The skill exposes arbitrary contract-call capability with signing and optional value transfer, but does not present it as a high-risk primitive. This effectively allows any calldata to be sent to any contract, enabling approvals, asset transfers, proxy execution, malicious interactions, or irreversible loss if invoked incorrectly or through prompt manipulation.
The approve command defaults to 2^256 - 1 unlimited allowance when no amount is provided, without a strong warning or confirmation step. Unlimited approvals are a common precursor to wallet drains if the spender is compromised, malicious, upgraded, or incorrectly specified, because they grant ongoing transfer rights over the token balance.
General-purpose smart contract execution is unjustified by the skill's stated purpose and gives the agent authority to perform arbitrary onchain actions with MPC-signed transactions. Because the same signing path is used for normal wallet operations, a user invoking a seemingly trading-related skill could be exposed to full-wallet transaction execution beyond expected boundaries.
The raw contract-call path signs arbitrary calldata with no decoding, no semantic validation, and no explicit safety interstitial beyond a generic log line. In the context of an MPC wallet skill, this enables opaque asset-draining actions such as approvals, arbitrary token transfers, permit flows, or malicious contract interactions that the user may not understand.
The lockfile pins ws to 8.18.3, and the finding cites known vulnerabilities affecting that exact version: uninitialized memory disclosure and memory-exhaustion denial of service. In this skill’s context, WebSocket handling may be reachable through blockchain RPC or streaming interactions via viem, so a vulnerable transitive dependency can expose the agent process to remote attacks or instability during DeFi/trading operations.
The skill invokes external CLI commands that inherently use network access and environment-based configuration, but it does not declare an explicit tool scope or permission boundary. In an agent setting, this can cause the skill to be invoked with broader execution privileges than users or orchestrators expect, increasing the chance of unintended network calls or secret-bearing environment use.
The trigger phrases are broad enough to activate high-risk blockchain transaction tooling for generic mentions of trading, DEX use, token balance, or contract calls. In an autonomous or assistive agent, overbroad activation can route benign user requests into a skill capable of signing irreversible on-chain actions.
Request target host is built from a dynamic or untrusted value. If the host is attacker-influenced, this enables SSRF to arbitrary internal or metadata endpoints.
const hash = keccak256(unsignedSerializedTx);
const hashBytes = Buffer.from(hash.slice(2), 'hex');
const resp = await fetch(`https://${SIGN_URL}/agent/sign/ecdsa`, {
method: 'POST',
headers: { 'X-API-KEY': config.apiKey },
body: JSON.stringify({ hash: Buffer.from(hashBytes).toString('hex') }),
The contract-call command allows signing and broadcasting arbitrary calldata to any address, which materially exceeds the advertised trading-focused scope. In a wallet-signing skill, this effectively exposes a general-purpose transaction executor that can approve malicious spenders, transfer assets, interact with unsafe contracts, or alter protocol positions under the wallet's authority.
The swap command accepts a --slippage option but computes slippageBps without ever using it; all swaps pass amountOutMin as 0n. This means transactions have no effective price protection and can execute at any output amount, exposing users to severe MEV, sandwich attacks, and unexpectedly bad execution.
The dependency uses a caret range, which allows new upstream releases within the same major version to be installed without explicit review. In a wallet/trading skill that can sign blockchain transactions, a compromised or malicious dependency update could directly affect transaction construction, approvals, or private signing workflows, making supply-chain risk more consequential than in ordinary apps.
},
"files": ["index.js"],
"dependencies": {
"goodwallet": "^0.2.0",
"viem": "^2.28.0",
"commander": "^13.1.0"
},
Using an unpinned viem version permits automatic uptake of future compatible releases that may introduce malicious code, regressions, or unsafe transaction/ABI handling. Because this skill performs DeFi and contract interactions, any supply-chain compromise in a core blockchain library could alter destinations, calldata, balances, or swap behavior with direct financial impact.
"files": ["index.js"],
"dependencies": {
"goodwallet": "^0.2.0",
"viem": "^2.28.0",
"commander": "^13.1.0"
},
"keywords": ["mpc", "wallet", "trading", "erc20", "defi", "agentic"],
The commander dependency is also unpinned, so upstream changes can be pulled in unexpectedly. While a CLI framework is less security-critical than wallet or blockchain libraries, it still expands the attack surface for supply-chain attacks, especially in tooling that may be used to trigger sensitive wallet actions.
"dependencies": {
"goodwallet": "^0.2.0",
"viem": "^2.28.0",
"commander": "^13.1.0"
},
"keywords": ["mpc", "wallet", "trading", "erc20", "defi", "agentic"],
"license": "UNLICENSED"