T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:29
- Finding
- Unpinned Third-Party Package Is Downloaded and Executed Automatically## Vulnerability Details **File Location**: `SKILL.md:29-30` **Vulnerability Type**: Unpinned third-party dependency execution **Risk Level**: Medium ### Vulnerable Code ```json "command": "npx", "args": ["-y", "@verticalint-michael/enrich-layer-mcp"], ``` ### Technical Analysis The MCP configuration invokes `npx` with the `-y` option and a package name that has no exact version constraint. Consequently, startup may automatically retrieve and execute whichever package release the registry currently resolves as the default version, without interactive confirmation or integrity verification. The effective executable can therefore change after the Skill has been reviewed. In addition, the package executes with the privileges of the OpenClaw process and is explicitly provided the `ENRICH_LAYER_API_KEY` environment variable. The personal npm scope shown here also differs from the `enrichlayer/mcp-server` GitHub organization referenced by the documentation, creating provenance ambiguity that should be resolved before trusting the package. ### Attack Path 1. An attacker compromises the npm publisher account, package, release process, or another relevant supply-chain component. 2. The attacker publishes a malicious package version that becomes the version resolved by the unpinned package reference. 3. A user starts OpenClaw with the documented MCP configuration. 4. `npx -y` retrieves the mutable package version and executes it without requesting confirmation. 5. Malicious package code runs under the OpenClaw user's account and receives the configured API key through its environment. 6. The code can misuse the API credential and access resources available to that operating-system account, subject to the host's sandboxing and permissions. ### Impact Assessment Successful exploitation can provide arbitrary code execution with the privileges of the user running OpenClaw. The compromised dependency can read the supplied `ENRIC ...[truncated 321 chars]
- Remediation
- ## Remediation Suggestions - Pin the package to an audited exact version, for example `@verticalint-michael/enrich-layer-mcp@X.Y.Z`, rather than allowing mutable default-version resolution. - Verify that the npm scope and publisher are officially controlled by the project linked in the documentation. - Prefer a reviewed installation step backed by a lockfile and registry integrity metadata instead of downloading code automatically whenever the MCP server starts. - Disable automatic confirmation and require explicit review before package installation or upgrades. - Establish a controlled dependency-update process that includes source review, vulnerability scanning, provenance verification, and regression testing. - Run the MCP server with least privilege in a sandbox or container, restrict filesystem and network access, and expose only the API credential strictly required by the server. - Rotate the API key immediately if dependency compromise is suspected, and monitor the account for unauthorized requests or credit consumption.
