T08 · Insecure Dependencies
- Location
README.md:16- Finding
Unpinned Package Execution Through npx
- Content
View full analysis
Vulnerability Details
File Location:
README.md:16
Vulnerability Type: Unpinned third-party package execution
Risk Level: MediumVulnerable Code
bash npx clawhub install zhangmengyang/karpathy-wiki-improveTechnical Analysis
The documented installation command invokes the
clawhubnpm package throughnpxwithout specifying a reviewed version or integrity constraint. If the package is not already available locally,npxcan retrieve and execute the version currently resolved by the configured npm registry.This creates a supply-chain risk because the code executed by the installation command can change after this skill has been reviewed. A compromised maintainer account, malicious package release, registry compromise, or unexpected upstream update could cause users following the documentation to execute attacker-controlled code.
The repository itself does not contain an embedded malicious script, and the audit found no evidence that the referenced package is currently malicious. The issue is the unsafe, unpinned execution mechanism.
Attack Path
- An attacker compromises the publication channel, maintainer account, or resolved package for the
clawhubCLI. - The attacker publishes a malicious or backdoored version that remains compatible with the documented command.
- A user follows the Quick Start instructions and runs
npx clawhub install zhangmengyang/karpathy-wiki-improve. npxresolves and downloads the compromised version because no package version or integrity value is specified.- The downloaded package executes with the privileges of the invoking user.
- Malicious installation logic can access or modify data available to that user, subject to operating-system and sandbox restrictions.
Impact Assessment
Successful exploitation could provide arbitrary code execution under the account running the installation command. The potential scope includes readable ...[truncated 395 chars]
- An attacker compromises the publication channel, maintainer account, or resolved package for the
- Remediation
View remediation
Remediation Suggestions
-
Pin the CLI to a specific, reviewed version:
bash npx clawhub@<reviewed-version> install zhangmengyang/karpathy-wiki-improve -
Document the expected npm registry and verified package identity so that scoped registry overrides or package-name confusion cannot silently alter the source.
-
Where supported, verify package provenance, signatures, checksums, or npm integrity metadata before execution.
-
Test and review each new CLI version before updating the documented pin.
-
Recommend running the installer as an unprivileged user in a restricted environment without unnecessary secrets.
-
For stronger reproducibility, install the reviewed dependency through a lockfile with integrity metadata and invoke the locally locked binary rather than resolving the latest package dynamically.
-
