T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:29
- Finding
- Unpinned Global Package Installation with Unsafe Force Override## Vulnerability Details **File Location**: `SKILL.md:29` and `SKILL.md:96` **Vulnerability Type**: Unpinned global dependency installation and forced file replacement **Risk Level**: Medium ### Complete Code Snippets At `SKILL.md:27-30`: ```bash **Installation:** ```bash npm install -g clawhub ``` ``` At `SKILL.md:94-97`: ```bash **Solution:** ```bash npm i -g clawhub --force ``` ``` ### Technical Analysis The instructions install the mutable latest version of the `clawhub` npm package globally without a version pin, integrity validation, or provenance verification. npm packages can execute lifecycle scripts during installation, so package content executes under the privileges of the user running npm. The additional recommendation to use `--force` weakens npm safeguards and can overwrite existing globally installed files or executable links. Treating this option as a general resolution for file conflicts can hide package collisions or tampering rather than identifying their cause. This is a supply-chain exposure rather than evidence that the named package is currently malicious. Exploitation depends on the registry package, publisher account, resolution process, or retrieved version becoming compromised. ### Attack Path 1. An attacker compromises the package publisher, registry distribution path, or a subsequently released package version. 2. The compromised package includes a malicious npm lifecycle script or executable. 3. A user follows the documented unpinned global installation command. 4. npm retrieves the attacker-controlled latest version and runs its installation logic. 5. If a conflict occurs, the documented `--force` command may overwrite existing global files or command links. 6. The payload executes with the permissions of the npm process and can affect resources available to that account. ### Impact Assessment Successful exploitation could execute code with the installing u ...[truncated 383 chars]
- Remediation
- ## Remediation Suggestions 1. Pin the CLI to a reviewed version, for example `npm install -g clawhub@VERSION`. 2. Verify the package name, publisher identity, repository, release provenance, and npm integrity metadata before installation. 3. Prefer a project-local installation or an isolated environment over a global installation where practical. 4. Review package lifecycle scripts before installing newly published or unexpectedly changed versions. 5. Replace the routine `--force` recommendation with steps that inspect the conflicting path, confirm ownership, remove only verified stale files, and retry without bypassing safeguards. 6. Explicitly warn users not to run the installation with administrator or root privileges unless a documented and reviewed deployment model requires it. 7. Use a lockfile, trusted internal mirror, or approved-version policy where reproducible installation is required.
