T08 · Insecure Dependencies
Error
- Location
- skill.json:24
- Finding
- Unpinned Third-Party Package Is Automatically Downloaded and Executed## Vulnerability Details **File Location**: `skill.json:24-30` and `README.md:21-23` **Vulnerability Type**: Unpinned dependency execution **Risk Level**: High ### Vulnerable Code `skill.json:24-30`: ```json "mcp": { "command": "npx", "args": [ "-y", "@agentdocs1/mcp-server", "--http" ], ``` `README.md:21-23`: ```json "command": "npx", "args": ["-y", "@agentdocs1/mcp-server", "--http"], ``` ### Technical Analysis The Skill uses `npx -y` to download and execute `@agentdocs1/mcp-server` without specifying an exact package version or verifying its integrity. The `-y` option suppresses confirmation, while the absence of a version constraint means the effective executable can change after the Skill has been reviewed. This creates a supply-chain trust boundary in which control of the package publisher account, package registry, or latest package release effectively provides control of code executed by the Skill. The launched process also receives the configured UPLO URL and API token through environment variables. ### Attack Path 1. An attacker compromises the package publisher account, registry delivery path, or a future package release. 2. The attacker publishes a modified version of `@agentdocs1/mcp-server`. 3. A user installs or invokes the Skill. 4. `npx -y` retrieves the current package version without confirmation. 5. The malicious package executes with the privileges of the user running the Agent. 6. The process can attempt to access the supplied API token, organizational data available through that token, and other resources accessible to the local process. ### Impact Assessment Successful exploitation could result in arbitrary code execution under the Agent user's account. Depending on local permissions, the malicious dependency could read files, access environment variables, exfiltrate the UPLO API token, query organizational knowledge, modify user-accessible data, ...[truncated 141 chars]
- Remediation
- ## Remediation Suggestions - Pin `@agentdocs1/mcp-server` to a specific, audited version rather than resolving the latest release. - Use a lockfile and verify package integrity with a trusted hash or signed provenance. - Avoid automatic confirmation through `npx -y` in security-sensitive deployments. - Prefer a preinstalled, administrator-approved binary or a reproducible installation process. - Verify the package publisher and monitor the dependency for ownership changes and security advisories. - Run the MCP server in a restricted sandbox with minimal filesystem and network access. - Provide the process with a narrowly scoped, revocable token rather than a broadly privileged API credential.
