T08 · Insecure Dependencies
- Location
skill.json:21- Finding
Automatic Execution of an Unpinned Third-Party npm Package
- Content
View full analysis
Vulnerability Details
File Location:
skill.json:21-30; duplicated in installation guidance atREADME.md:20-27
Vulnerability Type: Unpinned third-party dependency automatically downloaded and executed
Risk Level: HighVulnerable Code
skill.json:21-30:json "command": "npx", "args": [ "-y", "@agentdocs1/mcp-server", "--http" ], "env": { "AGENTDOCS_URL": "${config.agentdocs_url}", "API_KEY": "${config.api_key}", "DEFAULT_PACKS": "operations" }README.md:20-27:json "uplo-operations": { "command": "npx", "args": ["-y", "@agentdocs1/mcp-server", "--http"], "env": { "AGENTDOCS_URL": "https://your-instance.uplo.ai", "API_KEY": "your-api-key", "DEFAULT_PACKS": "operations" }Technical Analysis
The skill launches
@agentdocs1/mcp-serverwithnpx -ywithout specifying an exact package version or verifying package integrity. The-yoption suppresses confirmation, allowing npm to download and execute the currently resolved package release automatically.Consequently, the code executed by the skill can change after the skill itself has been audited. The repository contains no vendored server source, lockfile, integrity hash, or provenance information that would allow the effective MCP server implementation to be independently verified.
The MCP process also receives
API_KEYandAGENTDOCS_URLthrough its environment. Any code executed by the dependency can read those values. This does not establish that the current package is malicious, but it creates a significant supply-chain exposure if the npm package, publisher account, dependency tree, or package distribution infrastructure is compromised.Attack Path
- An attacker compromises the npm publisher account, package distribution channel, or a transitive dependency used by
@agentdocs1/mcp-server. - The attacker publishes a malicious release that remains ...[truncated 1325 chars]
- An attacker compromises the npm publisher account, package distribution channel, or a transitive dependency used by
- Remediation
View remediation
Remediation Suggestions
-
Pin the MCP server to a reviewed, exact version, for example:
json "args": [ "-y", "@agentdocs1/mcp-server@1.2.3", "--http" ]Do not use version ranges or tags such as
latest. -
Prefer installing dependencies through a committed lockfile with npm integrity metadata instead of downloading them dynamically whenever the skill starts.
-
Verify package provenance and signatures where supported. Publish a link to the corresponding source code and build artifacts so the executable package can be independently audited.
-
Remove automatic confirmation through
-ywhere operationally feasible. Require an explicit installation or upgrade step before executing a newly resolved package version. -
Run the MCP server in a restricted sandbox or container with:
- A read-only filesystem where possible.
- No access to unrelated user files.
- Restricted outbound network destinations.
- No privileged operating-system capabilities.
- Resource and process limits.
-
Provide a narrowly scoped, short-lived API token limited to required operations and organizational data. Do not reuse administrative or broadly privileged credentials.
-
Monitor and rotate the API token, maintain dependency vulnerability scanning, and require review before upgrading the pinned package version.
-
Apply the same pinned-version configuration to both
skill.jsonand the example inREADME.mdso users are not instructed to reproduce the unsafe setup.
-
