T08 · Insecure Dependencies
- Location
SKILL.md:45- Finding
Unpinned Third-Party Package Executes with Wallet Credentials
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 45-64
Vulnerability Type: Unpinned runtime dependency with access to sensitive signing credentials
Risk Level: HighVulnerable Code
json { "mcp": { "servers": { "blacktea": { "command": "npx", "args": ["-y", "@nmrtn/blacktea-mcp"], "env": { "EVM_PRIVATE_KEY": "0x...", "BLACKTEA_POLICY": "/path/to/policy.json" } } } } }bash hermes mcp add blacktea \ --command npx \ --args -y @nmrtn/blacktea-mcp \ --env EVM_PRIVATE_KEY=0x... BLACKTEA_POLICY=/path/to/policy.jsonTechnical Analysis
The Skill instructs users to execute
@nmrtn/blacktea-mcpthroughnpx -ywithout pinning an exact package version or verifying package integrity. This permits npm to retrieve and execute whichever package version currently satisfies the unversioned reference. The-yoption suppresses the normal installation confirmation.The resulting third-party process is explicitly given
EVM_PRIVATE_KEY, a funded Base wallet's private key used to sign x402 USDC payments. The reviewed project contains onlySKILL.md; it does not include the MCP server implementation, a lockfile, an integrity hash, or vendored source code. Consequently, the executable behavior, credential-handling claims, and policy enforcement cannot be verified from this artifact.This is a supply-chain exposure rather than proof that the currently published package is malicious. Exploitation would require compromise or malicious modification of the package, its publisher account, or its transitive dependency chain.
Attack Path
- An attacker compromises the npm publisher account, the referenced package, or a transitive dependency.
- The attacker publishes a malicious version under the same unpinned package name.
- The Agent starts the MCP server using
npx -y @nmrtn/blacktea-mcp. npxretrieves and executes the attacker-controlled pac ...[truncated 1089 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin
@nmrtn/blacktea-mcpto an exact, independently audited version instead of using an unversioned package reference. - Install dependencies ahead of execution using a committed lockfile with verified registry integrity hashes; avoid runtime package downloads through
npx. - Vendor or otherwise retain the reviewed implementation so the code that runs is identical to the code that was audited.
- Verify package provenance and release signatures where available, and continuously monitor direct and transitive dependencies for compromise.
- Run the MCP server in a restricted sandbox with minimal filesystem, environment, process, and network access.
- Use a dedicated, low-value wallet funded only to the maximum acceptable loss.
- Prefer an external signer or hardware-backed signing service that enforces destination, asset, network, per-transaction, and cumulative spending limits independently of the npm process.
- Rotate the wallet key immediately if package integrity is ever in doubt or if it may have been exposed to an untrusted package version.
- Ensure payment policy enforcement occurs in a trusted component that does not share unrestricted access to the raw private key.
- Pin
