T08 · Insecure Dependencies
Warning
- Location
- README.md:72
- Finding
- Unpinned npm Package Retrieval and Execution## Vulnerability Details **File Location**: `README.md:72` **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: Medium **Complete Code Snippet**: ```bash npx clawhub@latest install haskell ``` ### Technical Analysis The installation guidance directs users to execute the mutable `latest` release of the `clawhub` npm package. When the package is not already cached, `npx` retrieves it from the configured npm registry and executes its CLI code with the permissions of the invoking user. Because `latest` is a mutable distribution tag rather than an immutable, audited version, the code ultimately executed can change after this Skill has been reviewed. A compromised package maintainer account, registry package takeover, malicious new release, or compromised dependency could therefore turn this documented installation command into a remote code-execution path. The network access is relevant to installing the Skill, but selecting and executing an unpinned release exceeds the minimum necessary supply-chain trust. Installation can instead use an exact reviewed version and integrity verification. ### Attack Path 1. An attacker compromises the `clawhub` npm package, its maintainer account, publishing pipeline, or a dependency executed during installation. 2. The attacker publishes a malicious release and assigns it the `latest` distribution tag. 3. A user follows the command documented in `README.md`. 4. `npx` downloads the current package associated with `latest`. 5. The package's CLI or lifecycle code executes locally before the user can meaningfully inspect the retrieved implementation. 6. The malicious code acts with the invoking user's permissions and can access resources available to that user. ### Impact Assessment Successful exploitation could provide arbitrary code execution under the account running the command. Depending on that account's environment and permissions, the malicious package could read ...[truncated 414 chars]
- Remediation
- ## Remediation Suggestions 1. Replace `@latest` with an exact version that has been reviewed, for example: ```bash npx clawhub@X.Y.Z install haskell ``` 2. Verify the selected package version's provenance, publisher, release history, and integrity before documenting it. 3. Where practical, use a lockfile and npm integrity metadata to make dependency resolution reproducible. 4. Prefer invoking a separately installed, trusted CLI rather than combining remote retrieval and execution in one command. 5. Document that users should not run the installer with `sudo` or an administrator account. 6. Establish an update process in which version changes are explicitly reviewed before the pinned command is revised. 7. Consider documenting a manual download-and-verification path for security-sensitive environments.
