T08 · Insecure Dependencies
- Location
PUBLISH.md:10- Finding
Unpinned and Unverified Global npm CLI Installation
- Content
View full analysis
Vulnerability Details
File Location:
PUBLISH.md:10
Vulnerability Type: Supply-chain exposure through an unpinned global dependency
Risk Level: MediumVulnerable Code Snippet
markdown | ClawHub CLI installed | `npm install -g @openclaw/clawhub-cli` (verify package name in current docs) |Technical Analysis
The publishing guide instructs maintainers to globally install
@openclaw/clawhub-cliwithout specifying an exact version or integrity value. The same instruction explicitly indicates that the package name has not been verified.Consequently, npm resolves the package's current distribution tag at installation time. The installed content can therefore differ from what was reviewed when this project was published. A compromised package release, compromised maintainer account, or incorrectly documented package name could deliver arbitrary package lifecycle scripts. Global installation also exposes the package's executable through the user's command search path, increasing the effect of a malicious or compromised release.
This is a supply-chain weakness rather than evidence that the named package is currently malicious.
Attack Path
- An attacker compromises the referenced npm package, its publisher account, or the associated release process and publishes a malicious version under the resolved distribution tag.
- A maintainer follows
PUBLISH.mdand runs:bash npm install -g @openclaw/clawhub-cli - npm downloads the unpinned release and may execute package lifecycle scripts during installation.
- Malicious installation code runs with the privileges of the account invoking npm.
- The globally installed CLI can subsequently intercept publishing credentials, GitHub OAuth material available to the process, repository contents, or future commands executed through the spoofed CLI.
Impact Assessment
Successful exploitation can provide arbitrary code executio ...[truncated 704 chars]
- Remediation
View remediation
Remediation Suggestions
- Verify the official package name and installation procedure against authoritative ClawHub documentation before recommending it.
- Pin an audited exact version rather than resolving the latest distribution tag:
bash npm install -g @openclaw/clawhub-cli@<verified-version> - Record and verify the expected package provenance, publisher identity, and integrity metadata before installation.
- Prefer a lockfile-controlled, project-local development dependency over a global installation where the supported workflow permits it.
- Use npm provenance verification and review the package contents and lifecycle scripts before installation.
- Consider installing with lifecycle scripts disabled when compatible:
bash npm install -g --ignore-scripts @openclaw/clawhub-cli@<verified-version> - Perform publishing from a minimally privileged, isolated environment without unrelated credentials or repositories mounted.
- Update the guide whenever the verified CLI version changes, documenting the source and date of verification.
