T08 · Insecure Dependencies
- Location
install.sh:8- Finding
Unpinned Third-Party MCP Package Is Downloaded and Executed
- Content
View full analysis
Vulnerability Details
File Location:
install.sh, line 8
Additional Location:mcp-config.json, lines 4-5
Vulnerability Type: T08: Insecure Dependencies
Risk Level: HighVulnerable Code
install.sh:bash # Install the MCP server globally npm install -g truthsea-mcp-servermcp-config.json:json "command": "npx", "args": ["-y", "truthsea-mcp-server"],Technical Analysis
The installer downloads
truthsea-mcp-serverwithout specifying an exact version or verifying an integrity hash. The runtime configuration independently invokes the same unpinned package throughnpx -y, which permits automatic retrieval and execution without interactive confirmation.Consequently, the code reviewed during one installation is not guaranteed to be the code executed later. A newly published, compromised, or otherwise unsafe npm release could be selected automatically. The global installation also does not ensure that
npxwill execute the same previously reviewed package version.The effective MCP server implementation is not included in the audited project. Therefore, this audit cannot verify the documentation's assertion that the server never transmits or logs
DEPLOYER_PRIVATE_KEY. When configured, that private key is supplied to the external MCP process through its environment and can be read by any code executing inside that process.Attack Path
- An attacker compromises the npm account, package publication process, or another relevant component of the
truthsea-mcp-serversupply chain. - The attacker publishes a malicious version under the expected package name.
- A user runs
install.sh, causing npm to resolve and install the unpinned malicious release, or starts the MCP integration, causingnpx -yto retrieve and execute it. - The malicious package executes with the privileges of the user running the agent.
- If configured, the package reads `DEPLOYER_ ...[truncated 849 chars]
- An attacker compromises the npm account, package publication process, or another relevant component of the
- Remediation
View remediation
Remediation Suggestions
-
Pin a reviewed exact package version in both installation and execution paths, for example:
bash npm install --global --save-exact truthsea-mcp-server@2.5.0 -
Remove the unpinned
npx -yruntime invocation. Install the dependency locally and invoke its verified local executable directly. -
Commit a lockfile containing resolved versions and integrity metadata, and use
npm cifor reproducible installation. -
Verify the package provenance and registry integrity before installation. Consider requiring npm provenance attestations and approving package hashes in deployment policy.
-
Vendor or separately audit the MCP server implementation because it receives sensitive signing credentials and performs blockchain operations.
-
Supply the private key only at runtime through a secret manager rather than placing it directly in persistent configuration.
-
Continue using a dedicated, minimally funded wallet, and additionally restrict token approvals, contract permissions, and available balances.
-
Run the MCP server in a sandbox with limited filesystem and network access so dependency compromise does not grant unrestricted access to the host account.
-
Establish an explicit dependency-update process in which new versions are reviewed, tested, and approved before deployment.
-
