T08 · Insecure Dependencies
- Location
references/clawhub-publish.md:20- Finding
Unpinned Global npm Package Installation
- Content
View full analysis
Vulnerability Details
File Location:
references/clawhub-publish.md, line 20
Vulnerability Type:T08: Insecure Dependencies
Risk Level: MediumVulnerable Code:
bash npm i -g clawhubTechnical Analysis
The publishing instructions install the latest available version of the
clawhubnpm package globally without pinning a reviewed version or verifying package integrity. Because npm packages can execute lifecycle scripts during installation, following this command may execute code supplied by the package with the invoking user's permissions.The unpinned package reference is mutable: the code installed by this command can change after the skill has been audited. A compromised maintainer account, malicious package release, or supply-chain takeover could therefore turn this documented installation step into arbitrary local code execution. Global installation also increases the potential impact by placing the CLI in a system- or user-wide executable location.
Attack Path
- An attacker compromises the npm package, its publisher account, or a future release distributed under the referenced package name.
- The attacker publishes a malicious latest version, potentially including an npm lifecycle script.
- A user follows the documented
npm i -g clawhubinstruction. - npm retrieves the mutable latest release and may execute its installation scripts.
- The malicious package runs with the user's privileges and can access files, environment variables, authentication material, and other resources available to that account.
- The globally installed CLI may remain available and execute attacker-controlled behavior during later publishing or authentication operations.
Impact Assessment
Successful exploitation could provide arbitrary code execution with the privileges of the user running npm. The accessible scope may include the user's files, environment variables, OpenClaw configuration ...[truncated 467 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the package to an exact, reviewed version instead of installing the mutable latest release:
bash npm install --global clawhub@<reviewed-exact-version> - Verify the package name, publisher, provenance, and integrity against the official ClawHub distribution documentation before installation.
- Prefer a project-local dependency governed by a committed lockfile over a global installation when the workflow supports it.
- Use npm provenance and integrity controls, and review package contents and lifecycle scripts before approving version updates.
- Consider
--ignore-scriptswhen the official package does not require lifecycle scripts:bash npm install --global --ignore-scripts clawhub@<reviewed-exact-version> - Avoid running npm with
sudo, root, or administrator privileges. - Document the expected official registry and trusted package source to reduce dependency-confusion and registry-substitution risks.
- Treat package upgrades as security-relevant changes requiring review rather than automatically consuming the newest release.
- Pin the package to an exact, reviewed version instead of installing the mutable latest release:
