T08 · Insecure Dependencies
Warning
- Location
- README.md:7
- Finding
- Unpinned npm packages are downloaded and executed<![CDATA[ ## Vulnerability Details **File Location**: `README.md:7-11` and `README.md:52-58` **Vulnerability Type**: Unpinned third-party package installation and execution **Risk Level**: Medium ### Vulnerable Code ```markdown ### Via npx (recommended) ```bash npx skills add dessix-skill ``` ``` ```markdown ## Publishing to ClawHub Install the CLI globally: ```bash npm i -g clawhub ``` ``` ### Technical Analysis The documented commands resolve mutable package versions from the user's configured npm registry. Neither command identifies an exact, previously reviewed version: - `npx skills add dessix-skill` may download and execute the latest matching `skills` CLI package and retrieve a mutable skill release. - `npm i -g clawhub` globally installs the latest matching `clawhub` package and may execute package lifecycle scripts during installation. These packages are not covered by the project's reviewed `package-lock.json`. Consequently, their source, integrity, and transitive dependency graph can change after this project has been audited. A compromised package owner, malicious future release, registry substitution, or unsafe registry configuration could turn the documented installation workflow into an arbitrary-code execution path. ### Attack Path 1. An attacker compromises the relevant npm package, publisher account, dependency chain, or package distribution channel. 2. The attacker publishes a malicious version or substitutes the package through the user's configured registry. 3. A user follows the README and runs one of the unpinned commands. 4. npm resolves the attacker-controlled mutable release. 5. The package CLI or an installation lifecycle script executes with the invoking user's privileges. 6. The malicious package can access resources available to that user and, in the global-install case, place files in globally configured npm locations. ### Impact Assessment Successful exploitation can execute arbitrary code with the privileges of the ...[truncated 350 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin every executable package to an exact reviewed version rather than relying on a mutable latest release. 2. Replace the `npx` example with an exact-version invocation, such as: ```bash npm exec --package=skills@<reviewed-version> -- skills add dessix-skill ``` 3. Replace the global installation example with an exact version: ```bash npm install --global clawhub@<reviewed-version> ``` 4. Prefer project-local, lockfile-controlled tooling over global installation where practical. 5. Document the expected npm registry and package publisher identity. 6. Verify npm package provenance, integrity metadata, release signatures, and ownership before updating the documented version. 7. Review the selected packages and their transitive dependencies for lifecycle scripts before recommending execution. 8. Run installation with the least-privileged user account and avoid elevated shells. ]]>
