T08 · Insecure Dependencies
- Location
skill.json:24- Finding
Automatic Execution of an Unpinned npm Dependency
- Content
View full analysis
Vulnerability Details
File Location:
skill.json:24-30; also documented inREADME.md:17-30
Vulnerability Type: Unpinned third-party package automatically downloaded and executed
Risk Level: HighVulnerable Code
From
skill.json:json "mcp": { "command": "npx", "args": [ "-y", "@agentdocs1/mcp-server", "--http" ], "env": { "AGENTDOCS_URL": "${config.agentdocs_url}", "API_KEY": "${config.api_key}", "DEFAULT_PACKS": "nonprofit" }, "transport": "http", "url": "${config.agentdocs_url}/mcp" }The same installation pattern is presented in
README.md:json { "mcpServers": { "uplo-nonprofit": { "command": "npx", "args": ["-y", "@agentdocs1/mcp-server", "--http"], "env": { "AGENTDOCS_URL": "https://your-instance.uplo.ai", "API_KEY": "your-api-key", "DEFAULT_PACKS": "nonprofit" } } } }Technical Analysis
The skill invokes
npxwith the-yoption and a package name that has no exact version constraint. Consequently, npm may download and execute the version currently published under@agentdocs1/mcp-serverwithout prompting the user. The project provides no lockfile, integrity hash, vendored source, or locally reviewable implementation for that dependency.This creates a supply-chain trust boundary outside the audited project. A compromised registry account, malicious package release, or unsafe future update could change the code executed by the skill after this static review. The launched package also receives
API_KEYandAGENTDOCS_URLthrough its environment, increasing the consequences of dependency compromise.Attack Path
- An attacker compromises the npm publisher account, package release process, or another relevant part of the package supply chain.
- The attacker publishes a malicious version under `@agentdocs1/mcp-serve ...[truncated 1448 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the package to an audited exact version, for example
@agentdocs1/mcp-server@X.Y.Z, rather than resolving the latest available release. - Install the dependency through a committed lockfile and use a deterministic installation mechanism such as
npm ci. - Enforce package integrity verification through lockfile integrity metadata, trusted provenance, and signature or attestation validation where available.
- Avoid
npx -yfor automatic retrieval and execution. Prefer a preinstalled, reviewed binary from a controlled build artifact. - Review the dependency's source, transitive dependencies, lifecycle scripts, publisher provenance, and release process before deployment.
- Run the MCP server in a sandbox or container with restricted filesystem access, network egress controls, no unnecessary host mounts, and a dedicated low-privilege operating-system identity.
- Issue a narrowly scoped MCP token with only the read or write permissions required by the skill. Do not reuse administrative credentials.
- Configure short token lifetimes, rotation, revocation, audit logging, and alerts for anomalous access.
- Update the README configuration example so users are not instructed to execute an unpinned package automatically.
- Pin the package to an audited exact version, for example
