T08 · Insecure Dependencies
Warning
- Location
- README.md:12
- Finding
- Execution of an Unpinned Mutable npm Package## Vulnerability Details **File Location**: `README.md`, lines 12-37 **Vulnerability Type**: Supply-chain risk caused by unpinned package execution **Risk Level**: Medium ### Vulnerable Code ```bash npx clawhub@latest auth login --token "clh_..." --no-browser --registry "https://www.clawhub.ai/" ``` ```bash npx clawhub@latest publish ./clawhub-skill \ --slug popup-referrals \ --name "PopUp Referrals" \ --version 1.1.0 \ --changelog "v1.1.0: Improved skill description and metadata" \ --tags "referrals,earnings,vendors,popup" ``` ```bash npx clawhub@latest publish ./clawhub-skill \ --slug popup-referrals \ --name "PopUp Referrals" \ --version 1.2.0 \ --changelog "Description of changes" \ --tags "referrals,earnings,vendors,popup" ``` ### Technical Analysis The publishing instructions use `npx` with the mutable `latest` package tag. If the requested package version is not already available locally, `npx` may download and immediately execute package code from the configured npm registry. The `latest` tag can be changed after this project has been reviewed, so the effective code executed by these commands is neither version-pinned nor integrity-verified. This creates a supply-chain trust boundary outside the audited project. A compromised maintainer account, malicious package release, registry compromise, or compromised transitive dependency could cause arbitrary JavaScript to execute when a maintainer follows the documented workflow. ### Attack Path 1. An attacker compromises the `clawhub` npm package, its publishing account, its distribution channel, or a dependency used during CLI startup. 2. The attacker publishes a malicious release and assigns it to the `latest` tag. 3. A project maintainer follows `README.md` and runs one of the documented `npx clawhub@latest` commands. 4. `npx` retrieves and executes the attacker-controlled package in the maintainer's local environment. ...[truncated 665 chars]
- Remediation
- ## Remediation Suggestions - Replace `clawhub@latest` with a reviewed, exact package version, such as `clawhub@1.2.3`. - Commit and enforce an appropriate lockfile where the publishing tool is managed as a project dependency. - Use deterministic installation commands that enforce lockfile integrity. - Verify package provenance, registry origin, checksums, and signatures before execution. - Review dependency updates before changing the pinned version. - Run publishing tooling in an isolated, minimally privileged environment with only the credentials required for publication. - Avoid exposing unrelated environment variables, SSH agents, or filesystem mounts to the publishing process.
