T08 · Insecure Dependencies
- Location
SKILL.md:39- Finding
Unpinned Third-Party MCP Package Is Automatically Downloaded and Executed
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 39-50
Vulnerability Type: Unpinned runtime dependency execution
Risk Level: MediumVulnerable Code
json { "mcpServers": { "outfeed": { "command": "npx", "args": ["-y", "@outfeedai/mcp-server"], "env": { "OUTFEED_API_KEY": "{{OUTFEED_API_KEY}}" } } } }Technical Analysis
The MCP configuration invokes
npxwith the-yoption and an unversioned package name. This permitsnpxto retrieve and execute the package version currently resolved by the external package registry without interactive confirmation.Because no exact version or integrity value is specified, the code executed during a future skill invocation may differ from the code originally reviewed. A malicious future release, compromised publisher account, or registry-level supply-chain incident could cause attacker-controlled code to run in the agent's environment.
The same process receives
OUTFEED_API_KEYthrough its environment. Consequently, malicious dependency code would be able to read and exfiltrate that credential in addition to exercising the local permissions available to the MCP process.Attack Path
- An attacker compromises the
@outfeedai/mcp-serverpublisher account, release process, or relevant package-registry infrastructure. - The attacker publishes a malicious version under the legitimate package name.
- The skill starts the MCP server using
npx -y @outfeedai/mcp-server. - Because the dependency has no pinned version and confirmation is disabled,
npxresolves, downloads, and executes the malicious release. - The malicious package reads
OUTFEED_API_KEYfrom its process environment. - It can exfiltrate the API key, invoke Outfeed operations available to that credential, or execute other actions allowed by the MCP process's operating-system privileges.
Exploitation depends on c ...[truncated 854 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to a reviewed exact version, for example:
json "args": ["-y", "@outfeedai/mcp-server@1.2.3"] - Prefer installing dependencies during a controlled build or deployment stage rather than downloading and executing them at runtime.
- Use a lockfile and verified registry integrity metadata or cryptographic hashes to ensure the installed artifact matches the reviewed artifact.
- Remove automatic confirmation through
-ywhere interactive approval is practical. - Restrict package installation to an approved registry and monitor the dependency for publisher changes, unexpected releases, and known vulnerabilities.
- Run the MCP server in a sandbox or container with minimal filesystem, network, and operating-system permissions.
- Scope
OUTFEED_API_KEYto the minimum required permissions, rotate it periodically, and revoke it immediately if dependency compromise is suspected. - Ensure secrets are supplied only to verified processes and are not inherited by unrelated subprocesses.
- Pin the dependency to a reviewed exact version, for example:
