T08 · Insecure Dependencies
- Location
README.md:34- Finding
Unpinned Global Installation of an External CLI Package
- Content
View full analysis
Vulnerability Details
File Location:
README.md:34
Vulnerability Type: Unpinned global third-party package installation
Risk Level: MediumVulnerable Code:
bash npm install -g clawhubTechnical Analysis
The installation command retrieves the current registry-selected version of the
clawhubpackage without an exact version, integrity hash, signature check, or documented provenance verification. The-goption installs the package globally and exposes its executable commands system-wide.Because the package version is mutable from the user's perspective, the code executed during installation can differ from the code originally reviewed by the project author. npm packages may also define lifecycle scripts that execute during installation. This creates a supply-chain boundary in which compromise of the package, publisher account, or configured registry can result in execution of attacker-controlled code with the privileges of the user performing the installation.
Attack Path
- An attacker compromises the
clawhubpublisher account, package, or package distribution channel. - The attacker publishes a malicious or otherwise altered version under the expected package name.
- A user follows the documented
npm install -g clawhubcommand. - npm resolves and downloads the mutable package version without project-supplied integrity verification.
- Any malicious installation lifecycle code executes with the invoking user's privileges.
- The globally installed executable remains available for later commands and can perform additional attacker-controlled actions when invoked.
Impact Assessment
Successful exploitation can provide code execution under the account that runs npm. The affected scope may include that user's files, credentials, environment variables, and accessible development resources. If installation is performed with elevated privileges, the impact can extend to system ...[truncated 205 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
- Pin the CLI to an exact, reviewed version rather than allowing registry-selected updates.
- Document the authoritative package registry and verified publisher identity.
- Use npm lockfile integrity data or equivalent cryptographic provenance controls.
- Verify package signatures or registry provenance attestations before installation.
- Prefer a project-local development dependency invoked through
npx --no-installor an npm script instead of a global installation. - Run installation as a non-privileged user and prohibit
sudo npm install -g. - Review the package and its transitive dependencies, including all npm lifecycle scripts, before recommending installation.
