T03 · Remote Payload Retrieval and Execution
- Location
setup.sh:12- Finding
Unpinned Remote Repository Is Retrieved and Executed
- Content
View full analysis
Vulnerability Details
File Location:
setup.sh, lines 12-20
Vulnerability Type: Remote payload retrieval and supply-chain code execution
Risk Level: Mediumbash else echo "Cloning deBridge MCP..." git clone https://github.com/debridge-finance/debridge-mcp.git ~/debridge-mcp fi cd ~/debridge-mcp echo "Installing dependencies..." npm install echo "Building..." npm run buildTechnical Analysis
The setup script clones the current state of a remote repository without pinning an audited commit, release, or cryptographic digest. It then runs
npm installandnpm run buildfrom that repository. Both commands can execute repository-controlled code, including npm lifecycle hooks and build scripts.The effective payload can therefore change after this skill has been reviewed. If
$HOME/debridge-mcpalready exists, the script also trusts that directory without verifying its Git remote, ownership, integrity, or revision. This creates an additional local substitution path.The installation instructions in
SKILL.md, lines 14-17, reproduce the same unsafe workflow:bash git clone https://github.com/debridge-finance/debridge-mcp.git ~/debridge-mcp cd ~/debridge-mcp npm install npm run buildAttack Path
- An attacker compromises the upstream repository, a maintainer account, or a resolved npm dependency; alternatively, the attacker places a malicious project at
$HOME/debridge-mcp. - The attacker adds a malicious npm lifecycle hook, build command, dependency, or other repository-controlled executable content.
- A user runs
setup.shor follows the equivalent commands inSKILL.md. npm installornpm run buildexecutes the attacker-controlled payload with the user's privileges.- If the generated MCP server is subsequently registered with OpenClaw, compromised code may run again whenever OpenClaw launches that server.
Impact Assessment
Su ...[truncated 650 chars]
- An attacker compromises the upstream repository, a maintainer account, or a resolved npm dependency; alternatively, the attacker places a malicious project at
- Remediation
View remediation
Remediation Suggestions
- Pin the repository to a specific audited commit or immutable, signed release rather than using the current default branch.
- Verify the downloaded revision using an expected commit hash and, where available, a trusted release signature.
- Commit and review a dependency lockfile, then use
npm ciinstead ofnpm installto enforce deterministic dependency resolution. - Disable npm lifecycle scripts with
npm ci --ignore-scriptswhen functionality permits. If lifecycle scripts are required, review and explicitly allow only the necessary scripts. - Before using an existing
$HOME/debridge-mcpdirectory, verify that it is a Git repository with the expected remote URL, pinned revision, ownership, and clean working tree. Otherwise, stop installation rather than trusting it. - Build and run the MCP server in a sandbox or container with minimal filesystem, network, credential, and wallet access.
- Require explicit user review and confirmation before enabling the resulting MCP server, particularly because its tools can initiate cryptocurrency transactions.
