T08 · Insecure Dependencies
Warning
- Location
- README.md:66
- Finding
- Unpinned Third-Party Package Is Automatically Downloaded and Executed<![CDATA[ ## Vulnerability Details **File Location**: `README.md`, lines 66–86 **Vulnerability Type**: Unpinned dependency execution through `npx -y` **Risk Level**: Medium ### Vulnerable Code ```json { "mcpServers": { "vocab-voyage": { "command": "npx", "args": ["-y", "mcp-remote", "https://gponcrussdahcdyrlhcr.supabase.co/functions/v1/mcp-server"] } } } ``` The authenticated configuration uses the same unpinned package and additionally exposes a bearer token to the executed process: ```json { "mcpServers": { "vocab-voyage": { "command": "npx", "args": [ "-y", "mcp-remote", "https://gponcrussdahcdyrlhcr.supabase.co/functions/v1/mcp-server", "--header", "Authorization: Bearer vv_mcp_REPLACE_ME" ] } } } ``` ### Technical Analysis The documented Claude Desktop configuration invokes `npx -y mcp-remote` without an exact package version or integrity constraint. When the package is not already available in the local cache, `npx` can retrieve the current package release from the configured package registry and execute it automatically. The `-y` option suppresses the normal installation confirmation. Consequently, the code executed by this configuration is not immutable and may differ from the code that existed when the Skill was audited. A compromised package registry account, malicious future release, dependency compromise, or registry-resolution attack could introduce arbitrary code into the execution path. In the authenticated example, the downloaded process also receives the personal MCP bearer token as a command-line argument. A malicious package could read and exfiltrate that token in addition to accessing resources available to the desktop user's process. ### Attack Path 1. An attacker compromises the `mcp-remote` package, one of its dependencies, or its package-publishing account. 2. The attacker publishes a malicious release under the package name resolved by `npx`. 3. A ...[truncated 1240 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `mcp-remote` to an exact, reviewed version rather than resolving the latest release: ```json { "command": "npx", "args": [ "-y", "mcp-remote@REVIEWED_EXACT_VERSION", "https://gponcrussdahcdyrlhcr.supabase.co/functions/v1/mcp-server" ] } ``` 2. Prefer a separately installed and verified bridge binary over automatic package download at application startup. 3. Publish expected package checksums, signatures, and provenance information where supported. 4. Use a lockfile and integrity metadata for any locally maintained installation procedure. 5. Remove `-y` from instructions where automatic unattended acquisition is unnecessary. 6. Document how users can verify the package publisher, version, signature, and integrity before execution. 7. Avoid passing bearer tokens directly in command-line arguments where they may be exposed through process listings or logs. Use a protected environment variable, secret store, or client-supported credential mechanism. 8. Grant tokens only the minimum necessary scopes and provide clear rotation and revocation procedures for suspected compromise. ]]>
