T08 · Insecure Dependencies
- Location
SKILL.md:122- Finding
Unpinned GitHub MCP Package Is Automatically Downloaded and Executed
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 122–123
Vulnerability Type: Unpinned third-party dependency execution
Risk Level: MediumVulnerable Code
json "command": "npx", "args": ["-y", "@modelcontextprotocol/server-github"],Technical Analysis
The documented MCP configuration invokes
npxwith an unversioned npm package. Because no exact version, integrity hash, lockfile, or locally reviewed artifact is specified, the package resolved by the registry can change after the skill has been audited.The
-yoption suppresses the normal installation confirmation. Consequently, following the instructions can cause Cursor to download and execute package lifecycle or runtime code without an additional user approval step.This creates a supply-chain risk: compromise of the package, its maintainer account, a transitive dependency, or the npm delivery channel could replace the expected implementation with attacker-controlled code. The executed MCP process may inherit the local user's permissions and the configured
GITHUB_TOKEN.Attack Path
- An attacker compromises the named npm package, its publisher account, a dependency, or its distribution channel.
- The attacker publishes a malicious release under the package version range implicitly selected by the unversioned command.
- A user copies the documented configuration and starts or restarts Cursor.
- Cursor invokes
npx -y @modelcontextprotocol/server-github. npxretrieves the mutable package selected by the registry and executes it without an installation confirmation.- Malicious package code runs with the MCP process's operating-system privileges and can attempt to read inherited credentials, including
GITHUB_TOKEN, access files available to the user, or communicate with external systems.
Impact Assessment
Successful exploitation could provide arbitrary code execution with the privileges of the user running Cursor. The reachable scope may inc ...[truncated 454 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the MCP package to an exact, reviewed version rather than relying on the registry's current resolution:
json "command": "npx", "args": ["@modelcontextprotocol/server-github@X.Y.Z"] - Remove
-yso installation does not silently bypass user confirmation. - Prefer a separately installed and reviewed local dependency managed through a committed lockfile.
- Verify package provenance, publisher identity, release signatures where available, and registry integrity metadata before installation.
- Use automated dependency scanning and establish a controlled process for reviewing version upgrades.
- Run the MCP server with restricted filesystem and network access where the platform supports sandboxing.
- Replace broad classic token scopes with a fine-grained GitHub token limited to the required repositories and read-only operations.
- Ensure credentials are supplied only to the specific MCP process that needs them and are not exposed to unrelated processes.
- Pin the MCP package to an exact, reviewed version rather than relying on the registry's current resolution:
