T08 · Insecure Dependencies
- Location
SKILL.md:370- Finding
Unpinned MCP Server Package Execution Through npx
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 370–371
Vulnerability Type: Unpinned third-party dependency execution
Risk Level: MediumVulnerable Code
json "command": "npx", "args": ["-y", "@modelcontextprotocol/server-memory"]Technical Analysis
The documented MCP configuration invokes
npxwith the automatic-confirmation flag (-y) and references@modelcontextprotocol/server-memorywithout an exact version or integrity constraint.When this configuration is used, npm can resolve, download, and execute a package version selected by the registry at invocation time. Therefore, the code ultimately executed can change after the Skill has been reviewed. The
-yoption also suppresses the normal installation confirmation.This creates a supply-chain trust boundary: compromise of the package publisher, registry account, package dependencies, or package resolution path could cause unreviewed code to execute locally. No evidence indicates that the package is currently malicious; the confirmed issue is the unsafe, mutable dependency execution pattern.
Attack Path
- A user copies the documented configuration into an MCP client.
- The MCP client launches
npx -y @modelcontextprotocol/server-memory. npxresolves the unpinned package and its transitive dependencies through the configured npm registry.- If a resolved package release or dependency has been compromised, npm downloads and executes its lifecycle or runtime code without an interactive installation prompt.
- The malicious code runs under the MCP client's operating-system account and can act within that account's permissions.
Impact Assessment
Successful exploitation could provide arbitrary code execution with the privileges of the user running the MCP client. Depending on the execution environment and its restrictions, the compromised package could access readable project files, environment variables, MCP configuration, and memory data, or mo ...[truncated 240 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the MCP server to an exact reviewed version rather than relying on registry-time resolution.
- Install dependencies through a controlled project setup process using a committed lockfile and npm integrity metadata.
- Configure the MCP client to invoke the verified local executable directly instead of using
npx -yat runtime. - Remove automatic confirmation where practical so unexpected package installation is visible to the user.
- Review and update the pinned package and its transitive dependencies through a documented dependency-update process.
- Run the MCP server with least privilege and restrict its access to sensitive files, credentials, environment variables, and unrelated project directories.
