T08 · Insecure Dependencies
- Location
skill.json:26- Finding
Automatic Execution of an Unpinned Third-Party npm Package
- Content
View full analysis
Vulnerability Details
File Location:
skill.json:26-31andREADME.md:19-24
Vulnerability Type: Unpinned dependency and automatic remote package execution
Risk Level: MediumVulnerable Code
From
skill.json:26-31:json "mcp": { "command": "npx", "args": [ "-y", "@agentdocs1/mcp-server", "--http" ],The equivalent installation configuration appears in
README.md:19-24:json "uplo-facilities": { "command": "npx", "args": ["-y", "@agentdocs1/mcp-server", "--http"], "env": { "AGENTDOCS_URL": "https://your-instance.uplo.ai", "API_KEY": "your-api-key",Technical Analysis
The skill starts
@agentdocs1/mcp-serverthroughnpx -ywithout specifying an exact package version or verifying package integrity. If the package is not already available locally,npxcan retrieve it from the configured npm registry. The-yoption suppresses the normal installation confirmation.Consequently, the code executed at skill startup can change independently of the reviewed skill files. There is no lockfile, integrity hash, vendored implementation, or other mechanism in the audited project that binds execution to a previously reviewed release.
The downloaded MCP server also receives the configured
AGENTDOCS_URLand secretAPI_KEYthrough environment variables. Although no malicious behavior was found in the reviewed files, the external server implementation is absent from the project and could not be audited as part of this assessment.Attack Path
- An attacker compromises the npm package maintainer account, package publication process, registry path, or an upstream dependency used by
@agentdocs1/mcp-server. - The attacker publishes a modified package version containing malicious startup code.
- A user installs or starts this skill.
- The configuration invokes
npx -y @agentdocs1/mcp-server --http. - Because no exact ve ...[truncated 1083 chars]
- An attacker compromises the npm package maintainer account, package publication process, registry path, or an upstream dependency used by
- Remediation
View remediation
Remediation Suggestions
-
Pin
@agentdocs1/mcp-serverto a reviewed exact version rather than resolving the latest available release:json "args": [ "-y", "@agentdocs1/mcp-server@1.2.3", "--http" ] -
Use a lockfile and retain npm integrity metadata. Enforce reproducible installation with
npm cirather than downloading a potentially different package each time the skill starts. -
Remove automatic
npx -yinstallation from the runtime path. Install dependencies during a controlled build or deployment stage after package review and signature or integrity verification. -
Audit and monitor the package itself, its transitive dependencies, maintainer changes, and published release provenance. Prefer signed releases and trusted registries.
-
Run the MCP server in a restricted container or sandbox with minimal filesystem access, a read-only root filesystem where practical, limited outbound network access, and no unrelated environment variables.
-
Issue a narrowly scoped API token that can access only the facilities data and operations required by this skill. Avoid granting administrative, cross-tenant, or unrestricted export permissions.
-
Store the API token in an appropriate secret manager, rotate it regularly, redact it from logs, and revoke it immediately if package compromise is suspected.
-
Apply outbound network allowlisting so the server can communicate only with the intended UPLO instance and essential verified package infrastructure during controlled installation.
-
