T08 · Insecure Dependencies
- Location
skill.json:26- Finding
Unpinned npm Dependency Is Downloaded and Executed Without Confirmation
- Content
View full analysis
Vulnerability Details
File Location:
skill.json:26-32; duplicated installation pattern inREADME.md:17-28
Vulnerability Type: Supply-chain exposure through automatic execution of an unpinned third-party package
Risk Level: HighVulnerable Code
skill.json:26-32:json "mcp": { "command": "npx", "args": [ "-y", "@agentdocs1/mcp-server", "--http" ],README.md:17-28:json { "mcpServers": { "uplo-healthcare": { "command": "npx", "args": ["-y", "@agentdocs1/mcp-server", "--http"], "env": { "AGENTDOCS_URL": "https://your-instance.uplo.ai", "API_KEY": "your-api-key", "DEFAULT_PACKS": "healthcare" } } } }Technical Analysis
The Skill launches
@agentdocs1/mcp-serverthroughnpx -ywithout specifying an exact package version or integrity digest. If the package is absent locally,npxcan retrieve the currently resolved version from the configured npm registry. The-yoption suppresses the normal installation confirmation.Consequently, the code executed when the Skill starts is not immutable and can differ from the code that existed when this project was reviewed. A compromised npm publisher account, malicious package release, registry compromise, or unsafe registry substitution could introduce attacker-controlled code. Because npm packages can execute JavaScript and lifecycle behavior with the privileges of the invoking user, this is a direct supply-chain execution boundary.
The README reproduces the same unsafe configuration for users, while
skill.jsonmakes it part of the Skill's operational configuration.Attack Path
- An attacker compromises the
@agentdocs1/mcp-serverpublisher account, its release pipeline, or a registry trusted by the target environment. - The attacker publishes a malicious version that resolves when no explicit version is reques ...[truncated 1313 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to an exact reviewed version, for example
@agentdocs1/mcp-server@X.Y.Z; do not use version ranges or distribution tags. - Install dependencies during a controlled build or deployment phase rather than downloading them dynamically whenever the Skill starts.
- Commit and enforce a lockfile containing registry-resolved integrity hashes. Use deterministic installation such as
npm ci. - Configure the package manager to use an explicitly trusted registry and reject unexpected registry overrides.
- Verify package provenance, signatures, and integrity metadata in CI before deployment.
- Remove
-yfrom interactive setup paths where automatic approval is unnecessary. - Run the MCP server in a sandbox or dedicated low-privilege account with narrowly restricted filesystem and network access.
- Provide only the minimum-scope API token required for supported operations and rotate it if dependency compromise is suspected.
- Update both
skill.jsonand the README example so documentation does not instruct users to restore the unsafe behavior. - Establish dependency monitoring and require security review before changing the pinned package version.
- Pin the dependency to an exact reviewed version, for example
