T08 · Insecure Dependencies
- Location
references/mcp-integration.md:49- Finding
Unpinned NPM Package Execution in MCP Configuration
- Content
View full analysis
Vulnerability Details
File Location:
references/mcp-integration.md:49-70
Additional Location:SKILL.md:302-310
Vulnerability Type: Unpinned third-party dependency execution
Risk Level: MediumVulnerable Code
json { "mcpServers": { "2slides": { "command": "npx", "args": ["2slides-mcp"], "env": { "API_KEY": "YOUR_2SLIDES_API_KEY" } } } }The troubleshooting instructions also recommend executing the package directly:
bash npx 2slides-mcpTechnical Analysis
The MCP configuration invokes
2slides-mcpthroughnpxwithout specifying an exact package version, lockfile, checksum, or integrity constraint. Depending on the local NPM state,npxcan retrieve and execute the package version currently resolved by the public registry.This creates a supply-chain trust boundary in which the effective executable code can change after the Skill itself has been reviewed. A compromised package maintainer account, malicious package release, registry compromise, or dependency compromise could therefore introduce arbitrary code into subsequent installations.
Because the package is configured as a persistent MCP command, the affected release may execute whenever the MCP client launches the server. The process is also explicitly provided with the user's 2slides API key.
Attack Path
- An attacker compromises the
2slides-mcppackage, its maintainer account, or one of its transitive dependencies. - The attacker publishes a malicious release that remains compatible with the unversioned package name.
- A user follows the documented MCP configuration or runs
npx 2slides-mcpwhile troubleshooting. npxresolves, downloads, and executes the malicious release.- The malicious package executes with the permissions of the user running Claude Desktop or the terminal.
- It can access the explicitly supplied `API_KE ...[truncated 607 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
-
Pin the MCP package to an exact reviewed version:
json { "mcpServers": { "2slides": { "command": "npx", "args": ["--yes", "2slides-mcp@REVIEWED_EXACT_VERSION"], "env": { "API_KEY": "YOUR_2SLIDES_API_KEY" } } } } -
Prefer a controlled installation backed by a committed lockfile and NPM integrity metadata rather than allowing runtime package resolution.
-
Verify and document the expected package publisher, registry, source repository, and package signature or checksum.
-
Review direct and transitive dependencies before updating the pinned version.
-
Run the MCP process in a restricted environment with minimal filesystem permissions, a limited environment, and constrained outbound network access.
-
Replace troubleshooting instructions that execute an unversioned package with version-pinned commands.
-
