T08 · Insecure Dependencies
- Location
skill.md:32- Finding
Unpinned Third-Party Packages Are Downloaded and Executed
- Content
View full analysis
Vulnerability Details
File Location:
skill.md, lines 32–44
Vulnerability Type: Supply-chain risk from unpinned dependencies and automatic remote package execution
Risk Level: HighVulnerable Code:
json { "mcpServers": { "bottyfans": { "command": "npx", "args": ["-y", "@bottyfans/mcp"], "env": { "BOTTYFANS_API_KEY": "bf_live_xxx", "BOTTYFANS_API_URL": "https://api.bottyfans.com" } } } }The Skill also recommends installing the SDK without specifying a reviewed version:
bash npm install @bottyfans/sdkTechnical Analysis
The MCP configuration invokes
npx -y @bottyfans/mcpwithout a version constraint. Unless an appropriate package is already available locally,npxretrieves the package from the configured npm registry and executes it. The-yoption suppresses the interactive installation prompt.Because no exact version or integrity value is specified, the code executed by future installations can differ from the code reviewed during this audit. A compromised maintainer account, malicious package release, registry compromise, or dependency takeover could introduce arbitrary code. The process receives
BOTTYFANS_API_KEYthrough its environment and runs with the permissions of the agent process.The unpinned
npm install @bottyfans/sdkcommand creates a related supply-chain risk, although importing the SDK is not itself shown as an automatic installation step.Attack Path
- An attacker compromises the
@bottyfans/mcppackage, one of its transitive dependencies, or the relevant package-publishing account. - The attacker publishes a malicious version under the existing package name.
- A user follows the Skill documentation or starts the configured MCP server.
npx -ydownloads the current package version without requesting confirmation.- Malicious installation or runtime code executes ...[truncated 1079 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
- Pin the MCP package and SDK to exact, reviewed versions rather than using floating package references.
- Generate and retain a lockfile with package integrity hashes.
- Install dependencies during a controlled build or provisioning phase instead of downloading them through
npxwhenever the Skill runs. - Avoid
npx -yfor security-sensitive agent components. Configure the MCP server to execute a locally installed, verified binary. - Review transitive dependencies and use package provenance, signature, and registry-integrity controls where available.
- Disable npm lifecycle scripts during installation where compatible, then explicitly allow only required build steps.
- Run the MCP server in a sandbox with restricted filesystem and network access.
- Supply a narrowly scoped, revocable API credential to the MCP process and rotate it after suspected package compromise.
- Add dependency monitoring and require security review before upgrading the pinned versions.
