T08 · Insecure Dependencies
Error
- Location
- SKILL.md:92
- Finding
- Unpinned Global Installation of a Third-Party npm Package## Vulnerability Details **File Location**: `SKILL.md`, line 92 **Vulnerability Type**: Unverified and unpinned third-party dependency installation **Risk Level**: High ### Vulnerable Code ```bash npm install -g sloth-d2c-mcp ``` ### Technical Analysis The troubleshooting workflow instructs the agent to install `sloth-d2c-mcp` globally from the npm registry when the `sloth` command is unavailable. The dependency is installed without: - A fixed and reviewed version - A lockfile - An integrity hash - Publisher or source verification - Restrictions on npm lifecycle scripts - Explicit user approval immediately before installation Because no version is specified, npm resolves the package version associated with the mutable registry tag at installation time. A compromised maintainer account, malicious package release, registry compromise, or ownership transfer could therefore alter the executable code obtained after this skill has already been reviewed. Global npm installation may execute package lifecycle hooks such as `preinstall`, `install`, and `postinstall`. Those hooks execute with the permissions of the user running the agent. ### Attack Path 1. The `sloth` executable is absent from the environment. 2. The agent follows the troubleshooting instruction in `SKILL.md`. 3. The agent runs `npm install -g sloth-d2c-mcp`. 4. npm resolves and downloads the current package release rather than a reviewed, immutable version. 5. A malicious or compromised release executes code through an npm lifecycle hook or the installed CLI. 6. The payload runs with the invoking user's privileges and can access resources available to that account. ### Impact Assessment Successful exploitation can result in arbitrary local code execution with the agent user's permissions. Depending on the environment, the package could read or modify source code, access user-readable credentials and configuration files, alter globally install ...[truncated 233 chars]
- Remediation
- ## Remediation Suggestions - Pin the dependency to a specific, reviewed version, such as `sloth-d2c-mcp@X.Y.Z`. - Prefer a project-local dependency governed by a committed lockfile instead of a global installation. - Verify the package publisher, repository, release provenance, and registry integrity metadata. - Use an approved internal registry or vendored artifact where feasible. - Disable lifecycle scripts during installation when they are unnecessary, for example with `--ignore-scripts`. - Require explicit user confirmation before installing any package. - Run the tool in a restricted environment with minimal filesystem and credential access. - Periodically review and update the pinned version through a controlled dependency-update process.
