T08 · Insecure Dependencies
- Location
SKILL.md:92- Finding
Unpinned Global Installation of a Third-Party npm Package
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 92
Vulnerability Type: Unverified and unpinned third-party dependency installation
Risk Level: HighVulnerable Code
bash npm install -g sloth-d2c-mcpTechnical Analysis
The troubleshooting workflow instructs the agent to install
sloth-d2c-mcpglobally from the npm registry when theslothcommand 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, andpostinstall. Those hooks execute with the permissions of the user running the agent.Attack Path
- The
slothexecutable is absent from the environment. - The agent follows the troubleshooting instruction in
SKILL.md. - The agent runs
npm install -g sloth-d2c-mcp. - npm resolves and downloads the current package release rather than a reviewed, immutable version.
- A malicious or compromised release executes code through an npm lifecycle hook or the installed CLI.
- 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
View 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.
- Pin the dependency to a specific, reviewed version, such as
