T08 · Insecure Dependencies
Error
- Location
- SKILL.md:8
- Finding
- Unpinned MCP Package Execution Through npx## Vulnerability Details **File Location**: `SKILL.md`, lines 8-14 **Vulnerability Type**: Unpinned third-party executable dependency **Risk Level**: High ### Vulnerable Code ```json { "mcpServers": { "myagentinbox": { "command": "npx", "args": ["mcp-remote", "https://myagentinbox.com/mcp"] } } } ``` ### Technical Analysis The MCP configuration invokes `mcp-remote` through `npx` without specifying an exact package version or verifying package integrity. If the package is not already available in the execution environment, `npx` may resolve and download executable package code from the npm registry at setup or runtime. Because no version, lockfile, checksum, or controlled installation source is specified, the code executed by this configuration can differ from the version that was originally reviewed. A compromised maintainer account, malicious package release, registry compromise, or unexpected upstream update could therefore introduce arbitrary executable behavior. The configuration also connects the package to the externally operated MCP endpoint `https://myagentinbox.com/mcp`. The endpoint's tools and responses can change independently of this static Skill. This increases the trust placed in external infrastructure, although the confirmed dependency vulnerability is specifically the unpinned local execution of `mcp-remote`. ### Attack Path 1. An attacker compromises the `mcp-remote` package, its publishing account, or its distribution channel and publishes a malicious version. 2. A user installs or activates the Skill in an environment where the package is not pinned and securely preinstalled. 3. The configured `npx mcp-remote` command resolves the attacker-controlled or compromised package version. 4. `npx` downloads and executes the package under the identity and permissions of the Agent process. 5. Malicious package code accesses resources available to that process, performs un ...[truncated 575 chars]
- Remediation
- ## Remediation Suggestions 1. Pin `mcp-remote` to a specific, audited version rather than relying on unversioned npm resolution. 2. Install the dependency during a controlled build or deployment stage using a committed lockfile and integrity metadata. 3. Avoid runtime package installation through `npx`; invoke a verified local executable from an immutable installation instead. 4. Verify the package publisher, source repository, release provenance, and dependency tree before deployment. 5. Use npm integrity checks, a trusted internal registry or allowlist, and automated dependency scanning. 6. Run the MCP client with least privilege in an isolated environment that restricts filesystem access, environment variables, subprocess creation, and outbound network destinations. 7. Restrict outbound connectivity to the expected MCP host and validate its TLS identity. 8. Treat remote MCP responses, email bodies, and downloaded attachments as untrusted data; do not execute attachments or interpret message content as Agent instructions without explicit validation.
