T08 · Insecure Dependencies
- Location
references/clawhub-publish.md:6- Finding
Unpinned Global npm Package Installation
- Content
View full analysis
Vulnerability Details
File Location:
references/clawhub-publish.md, lines 6–8
Vulnerability Type: Unpinned third-party dependency installed globally
Risk Level: MediumVulnerable Code:
bash npm install -g clawhubTechnical Analysis
The documented command installs the latest available version of the
clawhubnpm package globally. It does not pin a reviewed version or provide a lockfile, integrity hash, signature-verification procedure, or other mechanism for validating the downloaded artifact.Because npm packages can run lifecycle scripts during installation, a compromised or unexpectedly modified package release could execute code with the privileges of the user running the command. The global installation scope also makes the resulting executable available beyond this individual workflow and may replace an existing version of the CLI.
Attack Path
- An attacker compromises the npm package, its publisher account, or the package distribution process.
- The attacker publishes a malicious release under the package name referenced by the documentation.
- A user follows the documented prerequisite and runs
npm install -g clawhub. - npm retrieves the latest release without enforcing a previously reviewed version or expected integrity value.
- Malicious installation lifecycle scripts execute with the invoking user's privileges, or the installed global CLI later executes attacker-controlled behavior.
- The compromised executable remains globally available to subsequent commands until it is removed or replaced.
Impact Assessment
Successful exploitation could permit arbitrary code execution with the privileges of the invoking user. This may allow access to that user's files, environment variables, authentication material available to the process, and ClawHub-related session data. It could also modify user-writable files or install a compromised CLI that affects later workflows. ...[truncated 262 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the CLI to a reviewed release, for example
clawhub@<approved-version>, rather than implicitly installing the latest version. - Verify that the package name, npm publisher, repository, and release provenance match the official ClawHub distribution channel.
- Record and validate an expected package integrity hash or use a lockfile-backed, reproducible installation process.
- Prefer a project-local dependency over a global installation, and invoke it through a controlled script or package runner that enforces the approved version.
- Where available, use an officially signed standalone release and verify its signature or checksum before execution.
- Review package lifecycle scripts before installation and consider disabling them with
--ignore-scriptswhen they are not required. - Run the installation under a non-administrative account with least privilege and avoid exposing unrelated credentials or sensitive environment variables to the installation process.
- Establish a controlled upgrade process in which new versions are reviewed and tested before the pinned version is changed.
- Pin the CLI to a reviewed release, for example
