T08 · Insecure Dependencies
- Location
SKILL.md:31- Finding
Unpinned Third-Party Package Is Downloaded and Executed Automatically
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:31,SKILL.md:82, andSKILL.md:90
Vulnerability Type: Unpinned dependency execution
Risk Level: HighVulnerable Code
At
SKILL.md:31:text The server runs via `npx -y @upstash/context7-mcp` with no auth required.At
SKILL.md:82:text /mcp set context7="{\"command\":\"npx\",\"args\":[\"-y\",\"@upstash/context7-mcp\"]}"At
SKILL.md:90:bash | npx -y @upstash/context7-mcp 2>/dev/null | grep '"name"'Technical Analysis
The documented commands use
npx -yto download and execute@upstash/context7-mcpwithout specifying an exact reviewed version or package integrity value. The-yoption suppresses confirmation, while the absence of a version pin means the registry determines which release is executed at runtime.Consequently, the effective executable can change after the Skill has been audited. If the package, its maintainer account, the package registry, or a transitive dependency is compromised, following these instructions can execute attacker-controlled JavaScript under the identity of the user running the agent.
The package name does not appear to be an obvious typo or dependency-confusion target based on the reviewed content. The vulnerability is the unsafe consumption of a mutable third-party dependency, not evidence that the current package version is malicious.
Attack Path
- An attacker compromises the
@upstash/context7-mcppublishing account, package release process, registry distribution path, or one of its executable dependencies. - The attacker publishes a malicious release that resolves under the unversioned package name.
- An operator or agent follows the configuration or manual-testing instructions in
SKILL.md. npx -yretrieves the currently resolved package without requesting interactive approval.- Package installation lifecycle logic or MCP server startup code executes with the permissions of the invoking user.
...[truncated 1011 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to an exact, reviewed version in every command and configuration example:
text @upstash/context7-mcp@X.Y.Z-
Keep the same exact version in the prose, OpenClaw MCP configuration, and manual-testing command so users do not accidentally invoke an unreviewed release.
-
Prefer installing the package through a controlled dependency workflow with a committed lockfile rather than downloading a mutable package at each invocation.
-
Verify package integrity through the package manager's lockfile integrity metadata or an independently validated checksum before execution.
-
Review package source, lifecycle scripts, and transitive dependency changes before updating the pinned version.
-
Where compatible with the package, disable unnecessary installation lifecycle scripts and execute the MCP server in a restricted environment with minimal filesystem, credential, and network access.
-
Document a deliberate upgrade process that includes security review and testing before changing the pinned version.
