T08 · Insecure Dependencies
- Location
SKILL.md:8- Finding
Unpinned Global npm Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 4 and 8–11
Vulnerability Type: Unpinned third-party dependency installed globally
Risk Level: MediumVulnerable Code
yaml metadata: {"clawdbot":{"requires":{"bins":["clawdhub"]},"install":[{"id":"node","kind":"node","package":"clawdhub","bins":["clawdhub"],"label":"Install ClawdHub CLI (npm)"}]}}markdown Install ```bash npm i -g clawdhubtext ### Technical Analysis The skill instructs users to install the latest available version of the `clawdhub` npm package globally. Neither the installation command nor the package metadata specifies a reviewed version or integrity value. Because the package reference is mutable, the code installed in the future may differ from the version assessed when this skill was published. npm package installation can also execute package lifecycle scripts. The global installation option places the executable in a shared system or user-level location, increasing its reach beyond the current project. No evidence establishes that the current `clawdhub` package is malicious. The risk arises from trusting an unpinned, externally maintained dependency and automatically accepting future releases. ### Attack Path 1. An attacker compromises the npm publisher account, package distribution channel, or a future package release. 2. The attacker publishes a malicious version under the referenced `clawdhub` package name. 3. A user follows the documented `npm i -g clawdhub` instruction after the malicious release becomes the default version. 4. npm retrieves the mutable latest release and may execute attacker-controlled lifecycle scripts during installation. 5. The globally installed executable can subsequently run attacker-controlled code whenever the user or agent invokes `clawdhub`. ### Impact Assessment Successful exploitation could execute arbitrary code with the permissions of the account running npm ...[truncated 467 chars]- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to an explicitly reviewed version, for example:
bash npm install --global clawdhub@1.0.0 - Update the package metadata so its dependency declaration uses the same exact version rather than an unversioned package name.
- Prefer a project-local installation with a committed lockfile instead of a global installation where the runtime supports that approach.
- Verify package provenance, publisher identity, registry origin, checksums, and signatures before approving version updates.
- Use a trusted, explicitly configured npm registry and prevent uncontrolled registry substitution.
- Review lifecycle scripts and dependency changes before upgrading the pinned version.
- Run installation without administrative privileges and in a restricted environment with only the filesystem and network access required for the task.
- Pin the dependency to an explicitly reviewed version, for example:
