T08 · Insecure Dependencies
- Location
SKILL.md:18- Finding
Unpinned npm Package Is Automatically Downloaded and Executed
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 18–27
Vulnerability Type:T08: Insecure Dependencies
Risk Level: MediumVulnerable Code
json { "mcpServers": { "gogcli-docs": { "command": "npx", "args": ["-y", "gogcli-mcp-docs"], "env": { "GOG_ACCOUNT": "you@gmail.com" } } } }Technical Analysis
The configuration invokes
npx -y gogcli-mcp-docswithout pinning the npm package to an exact, reviewed version or verifying its integrity. The-yoption suppresses the installation confirmation, allowing npm to automatically retrieve and execute the package version resolved at runtime.Consequently, the executable package can change after the Skill has been audited. The referenced GitHub repository does not cryptographically bind the npm artifact executed by
npxto a specific reviewed source revision. This creates a supply-chain exposure if the package, a maintainer account, the publication workflow, or a transitive dependency is compromised.Attack Path
- An attacker compromises the
gogcli-mcp-docsnpm package, its maintainer account, publication pipeline, or a dependency included in a new release. - The attacker publishes or causes npm to resolve a malicious package version.
- A user starts the configured MCP server.
npx -yretrieves the currently resolved package without requesting installation confirmation.- The malicious package executes with the operating-system privileges and environment available to the MCP process.
- The payload may access local files, process-accessible credentials, authentication material, and Google Docs data available through the authenticated account.
Impact Assessment
Successful exploitation could provide arbitrary code execution with the privileges of the user running the Agent or MCP server. The compromise scope may include readable or writable local resources, env ...[truncated 504 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
- Pin the package to an exact reviewed version, such as
gogcli-mcp-docs@X.Y.Z, rather than resolving the latest compatible release at runtime. - Install dependencies through a committed lockfile and enforce npm integrity hashes with
npm ci. - Avoid automatic runtime package retrieval where possible. Install the reviewed artifact during a controlled deployment phase and execute the installed binary directly.
- Verify that the npm package provenance corresponds to the intended source repository and reviewed commit. Use registry provenance/signature verification where supported.
- Review and pin transitive dependencies, and enable automated vulnerability and unexpected-release monitoring.
- Run the MCP server in a sandbox or restricted service account with minimal filesystem, network, environment-variable, and Google account permissions.
- Keep authentication material out of broadly accessible process environments and rotate credentials if package compromise is suspected.
- Pin the package to an exact reviewed version, such as
