T08 · Insecure Dependencies
- Location
README.md:34- Finding
Unpinned and Inconsistently Named CLI Packages May Execute Untrusted Registry Code
- Content
View full analysis
Vulnerability Details
File Location:
README.md:34-36andREADME.md:53-55
Vulnerability Type: Supply-chain exposure through mutable and inconsistent npm package resolution
Risk Level: MediumVulnerable Code
markdown - **`clawhub` CLI:** Install the official CLI tool: ```bash npm install -g @openclaw/clawhub-clitext ```markdown Users can then install it using: ```bash npx clawhub install openclaw-plugin-creator-skilltext ### Technical Analysis The instructions execute packages fetched from npm without pinning an exact version or verifying package integrity. The documented global installation uses the scoped package `@openclaw/clawhub-cli`, but the subsequent `npx` command resolves the different, unscoped package name `clawhub`. Unless those package identities are independently verified as equivalent, this discrepancy can cause `npx` to download and immediately execute code from an unintended package. npm packages may execute CLI entry points and, depending on npm configuration and package contents, lifecycle scripts. Registry ownership compromise, malicious version publication, dependency compromise, or confusion between the scoped and unscoped names could therefore lead to arbitrary local code execution. This finding concerns the installation instructions. The audited repository itself contains documentation only and does not include an executable payload. ### Attack Path 1. An attacker publishes or compromises the unscoped `clawhub` npm package, one of its dependencies, or a mutable version selected by the registry. 2. A user follows `README.md:55` and runs: ```bash npx clawhub install openclaw-plugin-creator-skillnpxresolves and downloads the unscoped package rather than necessarily invoking the previously documented@openclaw/clawhub-clipackage.- npm executes the downloaded package's CLI code and potentially applicable installation behavior with the invoking user's privileges.
- Malici ...[truncated 904 chars]
- Remediation
View remediation
Remediation Suggestions
- Use one verified package identity consistently. If the official package is
@openclaw/clawhub-cli, invoke its installed binary rather than resolving the unrelated unscoped package throughnpx. - Pin an audited exact version:
bash npm install -g --ignore-scripts @openclaw/clawhub-cli@<verified-version> - Publish and document integrity information or a signed release-verification process.
- Avoid
npxcommands that implicitly download mutable packages. If temporary execution is necessary, specify the exact verified package and version explicitly. - Use
--ignore-scriptswhere the package supports operation without lifecycle scripts. - Document how users can verify the npm publisher, package scope, version, and provenance before installation.
- Reconcile the installation command with the later invocation. For example:
bash npm install -g --ignore-scripts @openclaw/clawhub-cli@<verified-version> clawhub install openclaw-plugin-creator-skill - Test the corrected commands in a clean environment to ensure that they resolve only the intended scoped package.
- Use one verified package identity consistently. If the official package is
