T08 · Insecure Dependencies
Warning
- Location
- README.md:61
- Finding
- Unpinned Global Installation of Third-Party CLI## Vulnerability Details **File Location**: `README.md`, lines 61 and 271 **Vulnerability Type**: T08: Insecure Dependencies **Risk Level**: Medium ### Vulnerable Code ```bash npm i -g clawhub ``` The documentation also presents the equivalent unpinned alternative: ```bash pnpm add -g clawhub ``` ### Technical Analysis The installation instructions retrieve the latest available version of the third-party `clawhub` package and install it globally. No reviewed version, package integrity value, lockfile, or other verification mechanism is specified. Consequently, the installed code may differ from the version that existed when this skill was audited. If the package, publisher account, or package-distribution channel is compromised, a malicious release could execute package lifecycle scripts during installation or provide a malicious CLI afterward. Global installation increases exposure because the resulting executable is placed in the user's global command environment rather than being isolated to this project. ### Attack Path 1. An attacker compromises the `clawhub` package, its publisher account, or the relevant package-distribution channel. 2. The attacker publishes a malicious release under the expected package name. 3. A user follows the documented `npm i -g clawhub` or `pnpm add -g clawhub` instruction. 4. The package manager resolves the uncontrolled latest release because no version is pinned. 5. Malicious lifecycle scripts may run during installation, or the installed CLI may execute malicious behavior when invoked. 6. The payload operates with the permissions of the account running the package manager. ### Impact Assessment Successful exploitation could permit arbitrary code execution with the installing user's privileges. Depending on that user's access, the malicious package could read or modify user-accessible files, environment variables, development credentials, OpenClaw configuration, and project data. It could also replace the globally ...[truncated 281 chars]
- Remediation
- ## Remediation Suggestions - Pin `clawhub` to a specific version that has been reviewed and tested: ```bash npm install --save-dev clawhub@<reviewed-version> ``` - Prefer a project-local installation instead of a global installation so the dependency is isolated and explicitly represented in project metadata. - Commit and enforce a lockfile containing the resolved package version and integrity data. - Use deterministic package-manager modes such as `npm ci` in automated environments. - Document the expected package registry and reject unexpected registry overrides. - Review package provenance, publisher identity, transitive dependencies, and lifecycle scripts before approving version updates. - In CI or other sensitive environments, disable package lifecycle scripts when they are unnecessary: ```bash npm ci --ignore-scripts ``` - If global installation is operationally required, pin the exact version, verify package provenance or integrity, and perform installation in a restricted environment using a least-privileged account.
