T08 · Insecure Dependencies
- Location
README.md:35- Finding
Unpinned Package Retrieval and Execution Through npx
- Content
View full analysis
Vulnerability Details
File Location:
README.md, lines 35-42
Vulnerability Type:T08: Insecure Dependencies
Risk Level: MediumVulnerable Code
bash ### Method Two: Install Using ClawHub If this skill has been published to ClawHub: ```bash # Install the skill npx clawhub install stock-investment-advisor # Or from OpenClaw clawhub install stock-investment-advisortext ### Technical Analysis The documentation instructs users to run `npx clawhub` without specifying a reviewed package version, integrity hash, lockfile, or verified package source. If `clawhub` is not already available locally, `npx` can retrieve the current package from the configured package registry and immediately execute its command-line entry point. Consequently, the code that executes can differ from the code reviewed when this skill was published. Registry compromise, package-owner compromise, dependency compromise, or unexpected changes in a newer release could introduce arbitrary code into the installation process. The alternative `clawhub` command is also not tied to a documented binary location or verified version, although it is less directly indicative of on-demand retrieval. ### Attack Path 1. An attacker compromises the package, package publisher, registry account, or a transitive dependency used by the retrieved `clawhub` release. 2. The attacker publishes a malicious or altered release that is selected by the unpinned command. 3. A user follows the installation instructions and runs `npx clawhub install stock-investment-advisor`. 4. `npx` retrieves the mutable package content from the configured registry. 5. The retrieved command-line package executes with the privileges of the invoking user. 6. Malicious code can access or modify any resources available to that user. ### Impact Assessment Successful exploitation permits arbitrary code execution under the account that runs the installation c ...[truncated 411 chars]- Remediation
View remediation
Remediation Suggestions
- Pin
clawhubto an explicitly reviewed version rather than allowing the registry to select the current release. - Document the official package registry, publisher identity, and source repository.
- Verify package integrity using a lockfile and registry integrity metadata or a separately published cryptographic checksum.
- Prefer a previously installed and verified ClawHub binary instead of retrieving executable code through
npxduring installation. - Review both direct and transitive dependencies before recommending a release.
- Avoid running installation commands with elevated privileges.
- Document a secure update process so that new versions are reviewed before the pinned version is changed.
- Pin
