T08 · Insecure Dependencies
- Location
README.md:28- Finding
Automatic Execution of a Security-Sensitive Third-Party npm Package
- Content
View full analysis
Vulnerability Details
File Location:
README.md:28-32; duplicated inSKILL.md:35-39
Vulnerability Type: Supply-chain exposure through automatic third-party package retrieval and execution
Risk Level: MediumComplete Code Snippet:
markdown The skill teaches the agent *when* to use Loomal. The MCP server provides the actual tools. Register it once per machine — the npm package version is pinned for supply-chain safety: ```bash openclaw mcp set loomal '{"command":"npx","args":["-y","@loomal/mcp@0.5.0"],"env":{"LOOMAL_API_KEY":"loid-..."}}'text The equivalent setup instruction in `SKILL.md` is: ```markdown Register the Loomal MCP server (the user runs this; it stores their API key locally). The npm package version is pinned for supply-chain safety — bump it intentionally when you want a newer release: ```bash openclaw mcp set loomal '{"command":"npx","args":["-y","@loomal/mcp@0.5.0"],"env":{"LOOMAL_API_KEY":"loid-..."}}'text ### Technical Analysis The documented setup uses `npx -y` to retrieve and execute `@loomal/mcp@0.5.0` from the npm ecosystem without interactive review. Pinning the package version reduces exposure to unexpected future upgrades, but it does not independently verify the package contents, publisher identity, registry response, or artifact integrity. The downloaded package is outside the audited project and was not available for source review. It executes while receiving `LOOMAL_API_KEY` through its environment. According to the Skill documentation, this key can delegate access to email, stored credentials, live TOTP codes, calendars, identity signatures, and USDC payment operations. Consequently, trust in the external package and its distribution channel becomes part of the security boundary. The pre-scan warning about sending sensitive information over the network corresponds to declared functionality such as using credentials with user-selected services and tran ...[truncated 1773 chars]- Remediation
View remediation
Remediation Suggestions
- Avoid runtime installation through
npx -yfor a component that handles credentials and payment capabilities. Install the MCP package through a controlled deployment process before use. - Use a lockfile and verify the package tarball against an independently obtained integrity hash or signature.
- Audit and vendor the exact MCP implementation and its transitive dependencies where operationally feasible.
- Disable npm lifecycle scripts during installation unless the package demonstrably requires them and those scripts have been reviewed.
- Run the MCP server in a sandbox with restricted filesystem, process, and outbound-network access.
- Permit outbound connections only to explicitly trusted Loomal endpoints and intended user-selected destinations.
- Issue separate, short-lived API keys for individual agents or tasks and grant only the minimum required scopes.
- Do not combine mail, vault, calendar, signing, and payment scopes unless a single task genuinely requires all of them.
- Rotate or revoke the key immediately after task completion or any suspected package compromise.
- Validate the active identity and scopes with
identity_whoamibefore sensitive operations. - Document a verified package digest alongside the pinned version and update both through an explicit security review process.
- Avoid runtime installation through
