T08 · Insecure Dependencies
- Location
skill.json:22- Finding
Unpinned npm Package Is Automatically Downloaded and Executed
- Content
View full analysis
Vulnerability Details
File Location:
skill.json, lines 22–23
Vulnerability Type: Unpinned third-party dependency execution
Risk Level: HighVulnerable Code
json "command": "npx", "args": ["-y", "@agentdocs1/mcp-server", "--http"],Technical Analysis
The MCP configuration invokes
npxwith the unversioned package name@agentdocs1/mcp-server. Because no exact version, lockfile, or integrity hash is specified, the package resolved and executed at runtime can differ from the package that existed when the Skill was reviewed.The
-yoption automatically accepts installation prompts. As a result, starting the Skill can download and execute third-party package code without an additional user confirmation. npm packages may execute application code and lifecycle behavior with the permissions of the user running the Agent.This is a supply-chain vulnerability rather than evidence that the current package is malicious. Exploitation requires compromise of the package, its publisher account, or the relevant package-distribution infrastructure, or publication of a malicious future version.
Attack Path
- An attacker compromises the npm publisher account, package contents, or package-distribution path for
@agentdocs1/mcp-server. - The attacker publishes a malicious version that can be resolved by the unversioned package reference.
- A user installs or starts the Skill.
npx -yretrieves the currently resolved package without interactive approval.- The malicious package executes with the privileges of the Agent host user.
- The package may read process environment variables, including
API_KEYandAGENTDOCS_URL, access files available to that user, interact with the configured UPLO service, or make unauthorized network requests.
Impact Assessment
Successful exploitation could provide arbitrary code execution under the operating-system account running the Agent. The acce ...[truncated 645 chars]
- An attacker compromises the npm publisher account, package contents, or package-distribution path for
- Remediation
View remediation
Remediation Suggestions
- Pin
@agentdocs1/mcp-serverto an exact, reviewed version rather than relying on the latest registry resolution. - Install the dependency through a committed lockfile and enforce package-integrity verification during deployment.
- Remove
-ywhere interactive approval is appropriate, although this alone does not eliminate the supply-chain risk. - Prefer a preinstalled, reviewed artifact or immutable container image over downloading executable code when the Skill starts.
- Verify package provenance and signatures where supported, and continuously monitor the package and publisher for compromise.
- Run the MCP server in a sandbox or container with a read-only filesystem, restricted network egress, and no access to unrelated host files.
- Use a narrowly scoped, short-lived UPLO token and rotate it if dependency compromise is suspected.
- Restrict the token to only the HR operations and classification levels required by the Skill.
- Pin
