T08 · Insecure Dependencies
- Location
SKILL.md:10- Finding
Unpinned npm Package Is Downloaded and Executed During Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 10-14
Vulnerability Type: Unpinned third-party dependency execution
Risk Level: Mediummarkdown ## Installation ```bash npx clawhub@latest install openclaw-ai-cost-calctext ### Technical Analysis The documented installation command uses `npx` to download and execute `clawhub@latest`. The `latest` npm distribution tag is mutable and does not identify a fixed, previously reviewed package version. No lockfile, package integrity hash, or vendored copy of this dependency is present in the audited project. Consequently, the code executed by this command may change after the Skill has been reviewed. Although no malicious behavior was found in the included `calc.js`, the externally obtained installer is outside the audited project and cannot be verified from the available files. This creates a supply-chain risk: compromise of the npm package, its publisher account, its release process, or a future package version referenced by `latest` could cause the installation command to execute attacker-controlled JavaScript. ### Attack Path 1. An attacker compromises the `clawhub` package, its publisher credentials, or its release pipeline. 2. The attacker publishes a malicious release and assigns it to the mutable `latest` tag. 3. A user follows the installation instructions and runs `npx clawhub@latest install openclaw-ai-cost-calc`. 4. `npx` retrieves and executes the attacker-controlled package. 5. The malicious package operates with the permissions of the user who invoked the command and can access resources available to that account. ### Impact Assessment Successful exploitation permits arbitrary code execution with the invoking user's privileges. Depending on that user's permissions and environment, the malicious dependency could read or modify user-accessible files, collect credentials or environment variables, alter installed skills, execute additional programs, or establish persiste ...[truncated 202 chars]- Remediation
View remediation
Remediation Suggestions
- Replace the mutable
latesttag with an exact, reviewed package version, for example:bash npx --yes clawhub@<reviewed-exact-version> install openclaw-ai-cost-calc - Verify the selected release against a trusted integrity hash or signed provenance before execution.
- Use a committed lockfile where applicable and enforce integrity checks during installation.
- Document the expected package registry and source repository so users can detect registry substitution or an unexpected publisher.
- Review new dependency versions before updating the pinned version.
- Run installation with an unprivileged account in a restricted environment and avoid
sudoor administrator execution. - Where practical, install the reviewed package without lifecycle scripts first, inspect its contents, and only then execute the required command.
- Replace the mutable
