T08 · Insecure Dependencies
- Location
README.md:12- Finding
Unpinned Global npm Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
README.md:12-14
Vulnerability Type: Supply-chain exposure through an unpinned globally installed dependency
Risk Level: MediumVulnerable Code
bash # 1. Install the ClawHub CLI (v0.23.1 is already installed locally; otherwise run the following command) npm i -g clawhubTechnical Analysis
The documented command installs the latest version of the
clawhubnpm package rather than the stated, previously tested version0.23.1. Consequently, the component installed by a user may differ from the component validated when this package was prepared or audited.The
-goption installs the package globally. npm installation can also execute package lifecycle scripts, such aspreinstall,install, andpostinstall, with the permissions of the invoking user. If a future package version, its maintainer account, or the configured npm registry is compromised, following this instruction could execute attacker-controlled code.This finding does not establish that the current
clawhubpackage is malicious. The vulnerability is the lack of dependency pinning and integrity or provenance verification in the documented installation procedure.Attack Path
- An attacker compromises the npm package, a maintainer account, or the package-delivery registry.
- The attacker publishes a malicious version under the legitimate
clawhubpackage name. - A user follows
README.mdand executesnpm i -g clawhub. - npm resolves the unpinned request to the attacker-controlled version.
- Malicious lifecycle code executes during installation, or malicious CLI behavior executes when the user subsequently invokes
clawhub. - The payload operates with the permissions of the installing user and can affect globally installed tooling and user-accessible files.
Impact Assessment
Successful exploitation could provide arbitrary code execution with the invoking user's privileges. Potential impact includes ac ...[truncated 500 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to the version stated as tested:
bash npm install --global clawhub@0.23.1- Review and test each new version before updating the documented pin.
- Document the expected npm registry and package publisher so users can verify package provenance.
- Where supported, verify package signatures, provenance attestations, or published integrity information before installation.
- Avoid recommending elevated installation privileges. Prefer a user-scoped npm configuration or an isolated execution environment.
- For stronger reproducibility, provide a lockfile-backed local development dependency and invoke the pinned binary through an appropriate package script instead of relying on an unconstrained global installation.
