T08 · Insecure Dependencies
Error
- Location
- SKILL.md:41
- Finding
- Unpinned Global Wallet Package Creates a Supply-Chain Execution Risk## Vulnerability Details **File Location**: `SKILL.md`, lines 41-45 **Vulnerability Type**: Unpinned third-party dependency execution **Risk Level**: High ```bash npm install -g lightning-wallet-mcp lw register --name "my-agent" # save the API key lw deposit 10000 # fund with any wallet ``` ### Technical Analysis The documented setup installs `lightning-wallet-mcp` globally without specifying an exact version or verifying package integrity. npm installation can execute package lifecycle scripts, and a global installation makes the resulting executable available system-wide. The installed tool is subsequently used to create wallet credentials and manage deposited Lightning funds. If the package, one of its transitive dependencies, or its distribution account is compromised, attacker-controlled code could execute during installation or when the `lw` command is invoked. ### Attack Path 1. An attacker compromises the npm package, its publisher account, or a transitive dependency. 2. A malicious package version is published under the version range selected by the unpinned installation command. 3. A user follows the instructions and runs `npm install -g lightning-wallet-mcp`. 4. Malicious lifecycle or runtime code executes with the privileges of the installing user. 5. The user registers the agent and deposits Lightning funds as instructed. 6. The malicious component captures wallet credentials, changes payment destinations, or initiates unauthorized payments. ### Impact Assessment Successful exploitation could provide arbitrary code execution with the installing user's privileges. It could also expose generated wallet credentials and enable theft of deposited Lightning funds or manipulation of payment transactions. Cryptocurrency payments are generally irreversible, increasing the financial impact.
- Remediation
- ## Remediation Suggestions - Pin `lightning-wallet-mcp` to an exact, reviewed version. - Verify package provenance, publisher identity, signatures, and integrity hashes before installation. - Avoid global installation; run the package in an isolated environment with minimal operating-system privileges. - Review package lifecycle scripts and the complete transitive dependency tree. - Use a committed lockfile where applicable. - Configure strict wallet spending limits and keep only the minimum required balance available. - Use revocable, narrowly scoped wallet credentials and document credential-rotation procedures.
