T08 · Insecure Dependencies
- Location
README.md:14- Finding
Unpinned Package Execution Through npx Installation Command
- Content
View full analysis
Vulnerability Details
File Location:
README.md:14-17; equivalent command inREADME_CN.md:14-17
Vulnerability Type: Unpinned third-party dependency execution
Risk Level: MediumVulnerable Code
README.md:14-17:bash ## Install ```bash npx clawhub install maxhub-zhihutext `README_CN.md:14-17`: ```bash ## Installation ```bash npx clawhub install maxhub-zhihutext ### Technical Analysis The documented installation procedure invokes `clawhub` through `npx` without specifying a reviewed package version or integrity digest. If the package is not already installed locally, `npx` can retrieve it from the configured npm registry and execute its command immediately. Consequently, the code executed during installation is not cryptographically tied to the version that was reviewed during this audit. Its behavior can change if a new package version is published, the publisher account is compromised, the registry resolution is manipulated, or the resolved package is replaced with a malicious release. This is a supply-chain exposure rather than evidence that the current `clawhub` package is malicious. The project contains no lockfile, checksum, or other mechanism that constrains the documented command to a known artifact. ### Attack Path 1. An attacker compromises the package publisher account, registry distribution path, or another component involved in resolving the unpinned `clawhub` package. 2. The attacker publishes a malicious version under the package name resolved by `npx`. 3. A user follows the installation instructions and runs `npx clawhub install maxhub-zhihu`. 4. `npx` downloads the currently resolved package rather than a specifically reviewed version. 5. The malicious package executes with the privileges and environment of the user running the command. 6. Depending on those privileges, the package could access user-readable files and environment variables, mod ...[truncated 740 chars]- Remediation
View remediation
Remediation Suggestions
- Pin the CLI to an explicitly reviewed version, for example:
bash npx --yes clawhub@<reviewed-version> install maxhub-zhihu - Document the expected npm registry and package publisher so users can verify package provenance.
- Publish and verify an integrity digest or signed release artifact where the installation workflow supports it.
- Prefer requiring users to install a verified, version-pinned CLI separately before using it:
bash clawhub install maxhub-zhihu - Use lockfiles with integrity metadata in automated installation environments.
- Keep the English and Chinese installation instructions synchronized after applying the hardened command.
- Advise users not to execute the installer with administrator or root privileges unless explicitly required and justified.
- Pin the CLI to an explicitly reviewed version, for example:
