T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:21
- Finding
- Unpinned npm Package Is Downloaded and Executed Automatically<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:21-25` **Vulnerability Type**: Supply-chain exposure through unpinned package execution **Risk Level**: Medium ### Vulnerable Code ```json { "mcpServers": { "gogcli-gmail": { "command": "npx", "args": ["-y", "gogcli-mcp-gmail"], "env": { "GOG_ACCOUNT": "you@gmail.com" } } } } ``` ### Technical Analysis The recommended configuration invokes `npx -y gogcli-mcp-gmail` without specifying an exact package version or integrity digest. Consequently, startup can download and execute whichever package version the npm registry currently resolves. The `-y` option suppresses the installation confirmation that could otherwise alert the user that code is being downloaded. Although no malicious dependency was identified in the reviewed artifact, this configuration creates a mutable execution channel: the code executed in a future session may differ from the code covered by this audit. This is an insecure dependency-loading practice rather than evidence that the current package is malicious. ### Attack Path 1. An attacker compromises the npm publisher account, registry entry, or release pipeline for `gogcli-mcp-gmail`. 2. The attacker publishes a malicious version under the same package name. 3. A user starts the MCP server using the documented `npx -y` configuration. 4. `npx` resolves and downloads the newly published version without interactive confirmation. 5. The malicious package executes with the privileges and environment of the MCP server process. ### Impact Assessment A compromised package could execute arbitrary Node.js code with the MCP process's operating-system privileges. Depending on the deployment, this could expose: - Gmail data accessible through stored `gog` credentials. - OAuth-related configuration and account metadata. - Files readable or writable by the MCP process. - Tool requests and responses handled by the server. - Network access a ...[truncated 144 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the reviewed package to an exact version: ```json { "command": "npx", "args": ["gogcli-mcp-gmail@2.30.0"] } ``` 2. Prefer installing the package through a lockfile-controlled deployment rather than downloading it at every startup. 3. Remove `-y` where interactive installation confirmation is operationally acceptable. 4. Verify package integrity using npm lockfile integrity metadata or a separately published checksum. 5. Pin and verify the `gogcli` binary release as well as the Node.js package. 6. Require a new security review before updating either the npm package or bundled CLI. 7. Consider installing from a verified release artifact and running the already-installed local executable. ]]>
