T08 · Insecure Dependencies
- Location
README.md:30- Finding
Unpinned Global npm Package Installation
- Content
View full analysis
Vulnerability Details
File Location:
README.md, lines 30-35
Vulnerability Type: Unpinned third-party dependency installed globally
Risk Level: MediumVulnerable Code Snippet:
bash npm i -g clawhub clawhub install daniels-running-planTechnical Analysis
The installation instructions retrieve the latest available version of the
clawhubnpm package without specifying a reviewed version or verifying package integrity. npm packages may execute lifecycle scripts during installation. The-goption installs the package globally, increasing its reach beyond the project directory.The command does not independently prove malicious behavior. However, it creates a supply-chain exposure because the effective code installed in the future can differ from the code reviewed when these instructions were published. Compromise of the package, its publisher account, the configured npm registry, or a future package release could cause users to install attacker-controlled code.
Attack Path
- An attacker compromises the
clawhubpackage, its publisher account, its dependency chain, or the package source used by the configured registry. - The attacker publishes a malicious release or modifies a transitive dependency.
- A user follows the documented
npm i -g clawhubinstruction. - npm resolves the mutable latest version and downloads the compromised package.
- Malicious lifecycle scripts or installed executable code run with the permissions of the user performing the installation.
- The globally installed executable remains available to subsequent sessions until removed.
Impact Assessment
Successful exploitation could execute arbitrary code with the installing user's privileges. The attacker could access or modify files available to that account, steal environment variables or credentials readable by it, alter globally installed tooling, and affect later invocations of the installed comm ...[truncated 202 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
- Pin
clawhubto an explicitly reviewed version rather than relying on the latest release. - Document the expected npm registry and exact package identity.
- Publish and verify an integrity hash, lockfile, signed provenance, or equivalent package attestation.
- Prefer a project-scoped installation or an ephemeral invocation over a global installation where feasible.
- Review package lifecycle scripts and the dependency tree before recommending installation.
- Avoid recommending elevated installation privileges.
- Establish a process for reviewing and updating the pinned version when security fixes are released.
- Pin
