T08 · Insecure Dependencies
- Location
SKILL.md:21- Finding
Unpinned Third-Party Package Is Automatically Downloaded and Executed
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:17-28
Vulnerability Type: Supply-chain exposure through unpinned package execution
Risk Level: HighVulnerable Code
json { "mcpServers": { "lovtrip": { "command": "npx", "args": ["-y", "lovtrip@latest", "mcp"], "env": { "GEMINI_API_KEY": "your-gemini-api-key" } } } }Technical Analysis
The recommended MCP configuration invokes
npxwith both-yandlovtrip@latest. This causes npm to download and execute whichever package version is currently published under that name without interactive confirmation, an exact version constraint, an integrity hash, or a project lockfile.The effective executable can therefore change after this Skill has been reviewed. Although the audited standalone script does not download executable code, following the recommended setup delegates execution to an externally maintained and mutable npm package.
This violates least-privilege and reproducibility principles because downloaded package code executes with the invoking user's local permissions and receives the configured
GEMINI_API_KEYthrough its environment.Attack Path
- An attacker compromises the npm publisher account, package repository, build pipeline, or a future package release.
- The attacker publishes a malicious version under the
lovtrippackage name. - A user follows the documented MCP configuration.
npx -y lovtrip@latest mcpretrieves the malicious release and executes it without confirmation.- The package reads
GEMINI_API_KEYfrom its environment and may access any other files, credentials, network resources, or processes available to the invoking user. - The malicious code can exfiltrate data or perform arbitrary actions within that user's privilege boundary.
Impact Assessment
Successful exploitation can provide arbitrary code execution with the privileg ...[truncated 585 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace
lovtrip@latestwith an exact, reviewed version such aslovtrip@x.y.z. - Commit a lockfile and enforce package integrity verification where the surrounding installation model supports it.
- Avoid
npx -yfor security-sensitive execution because it suppresses confirmation before downloading and running code. - Prefer shipping reviewed implementation code with the Skill or installing dependencies through a controlled build process.
- Run the MCP server under a dedicated, restricted account or sandbox with access only to required resources.
- Supply only the required API key to the process and prevent inheritance of unrelated secrets.
- Establish a dependency update process that reviews source changes, package provenance, and integrity before changing the pinned version.
- Replace
