T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:12
- Finding
- Unpinned Third-Party Packages Are Downloaded and Executed<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 12–16 and 37–51 **Vulnerability Type**: Unsafe and unpinned third-party dependency execution **Risk Level**: Medium ### Vulnerable Code ```markdown ## Installation ```bash npm install -g mcp-bridge-openclaw ``` ``` ```markdown ## Configuration Create `config.json`: ```json { "servers": { "filesystem": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"], "env": {} } } } ``` ``` ### Technical Analysis The installation command globally installs `mcp-bridge-openclaw` without pinning an exact version or verifying package integrity. The example configuration also invokes `npx` with the `-y` option to retrieve and execute the latest package version without requiring confirmation. Both package references are mutable. The effective code executed by a user can therefore differ from the code available when this skill was reviewed. The project contains no vendored dependency source, lockfile, integrity hash, or executable implementation that would allow the package behavior to be independently verified. The global installation command can also run npm lifecycle scripts with the invoking user's privileges. Likewise, `npx -y` can download and execute package code automatically. This creates supply-chain exposure if the package, publisher account, dependency tree, or package registry distribution channel is compromised. ### Attack Path 1. An attacker compromises the publisher account, package release process, or a transitive dependency. 2. The attacker publishes a malicious version under the referenced package name. 3. A user follows the skill instructions and runs the unpinned global installation command, or starts the configured server using `npx -y`. 4. npm retrieves the current malicious release because no exact version or integrity value is specified. 5. Malicious lifecycle or runtime code executes with the privileges and envi ...[truncated 850 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin every package to a reviewed exact version, including packages launched through `npx`. 2. Replace the automatic invocation with an explicitly versioned command, such as: ```bash npx --no-install @modelcontextprotocol/server-filesystem@REVIEWED_VERSION /tmp ``` Install the reviewed dependency locally beforehand. 3. Maintain a lockfile and verify package integrity using registry integrity metadata or independently recorded checksums. 4. Prefer a project-local installation over `npm install -g` to limit scope and improve reproducibility. 5. Review direct and transitive dependency source code before approving updates. 6. Disable npm lifecycle scripts during installation where package functionality permits: ```bash npm install --ignore-scripts ``` 7. Run the bridge and MCP servers in a sandbox or container with only the minimum required filesystem and network permissions. 8. Remove `-y` so package download and execution cannot occur without an explicit user decision. 9. Establish an update process that requires security review before changing pinned versions. ]]>
