T08 · Insecure Dependencies
- Location
SKILL.md:31- Finding
Unpinned Packages Fetched and Executed Through npx
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 31 and 37
Vulnerability Type: Supply-chain risk caused by executing unpinned registry packages
Risk Level: MediumVulnerable Code
bash npx clawhub install github-bounty-hunterbash npx github-bounty-hunterTechnical Analysis
The documented commands invoke npm packages through
npxwithout specifying audited versions or integrity constraints. If a referenced package is not already installed locally,npxmay retrieve the currently resolved package version from the configured npm registry and execute its lifecycle or CLI code.Consequently, the code reviewed in this project is not guaranteed to be the same code that a user executes by following the documentation. A compromised publisher account, package takeover, malicious new release, dependency confusion condition, or compromised package dependency could alter the effective executable payload after this audit.
Attack Path
- An attacker compromises the publishing account, registry package, or dependency chain associated with
clawhuborgithub-bounty-hunter. - The attacker publishes a malicious version under the package name referenced by the documentation.
- A user follows the installation or usage instructions in
SKILL.md. npxresolves and downloads the mutable package version from the configured registry.- Malicious lifecycle scripts or CLI entry-point code execute with the privileges of the user running the command.
Impact Assessment
Successful exploitation can provide arbitrary code execution under the invoking user's account. Depending on that account's permissions and environment, the malicious package could access readable files, source code, environment variables, developer credentials, SSH configuration, npm tokens, or other user-level resources. It could also modify user-owned files and make outbound network requests.
This issue does ...[truncated 247 chars]
- An attacker compromises the publishing account, registry package, or dependency chain associated with
- Remediation
View remediation
Remediation Suggestions
- Pin every remotely resolved package to a specifically reviewed version rather than relying on the registry's current resolution, for example
npx github-bounty-hunter@1.0.0. - Pin the installer package as well, rather than invoking an unversioned
clawhubpackage. - Use a lockfile containing integrity hashes when distributing or installing the project through npm.
- Prefer invoking a locally installed, reviewed binary with
npm exec --noor an equivalent mechanism that refuses implicit downloads. - Verify package provenance, publisher identity, source repository, release signatures, and registry integrity before execution.
- Disable or carefully review package lifecycle scripts during installation where operationally possible.
- Document the exact audited package version and checksum so users can verify that the downloaded artifact matches the reviewed release.
- Run installation and CLI commands using a least-privileged account in an isolated environment, without unnecessary credentials in environment variables.
- Pin every remotely resolved package to a specifically reviewed version rather than relying on the registry's current resolution, for example
