T08 · Insecure Dependencies
- Location
README.md:6- Finding
Execution of an Unpinned npm Package During Installation
- Content
View full analysis
Vulnerability Details
File Location:
README.md, line 6
Vulnerability Type: Supply-chain risk caused by executing a mutable npm package version
Risk Level: MediumVulnerable Code
bash npx clawhub@latest install habit-tracker-proTechnical Analysis
The documented installation command instructs users to execute the
latestversion of the third-party npm packageclawhub. Thelatestdistribution tag is mutable and can resolve to different package contents over time. Consequently, the code executed by users may differ from the version that was reviewed or expected when this project was published.When the package is not already available locally,
npxcan retrieve it from the configured npm registry and execute its command. Package execution may also involve npm lifecycle behavior. The instruction does not pin an exact reviewed version, provide an integrity digest, or otherwise establish a reproducible trust boundary.This issue does not establish that the current
clawhubpackage is malicious. It creates an exploitable supply-chain path if the package, publisher account, registry resolution, or mutable release tag is compromised.Attack Path
- An attacker compromises the
clawhubpublisher account, package release process, or another component involved in npm package resolution. - The attacker publishes a malicious release and assigns it to the
latestdistribution tag. - A user follows the installation command from
README.md. npxretrieves the attacker-controlled release resolved byclawhub@latest.- The package executes with the privileges and environment of the invoking user.
- The malicious package can access resources available to that user, subject to operating-system and runtime restrictions.
Impact Assessment
Successful exploitation could permit arbitrary code execution with the privileges of the user running the installation command. Depending on that user's environment, the reachable s ...[truncated 436 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
-
Replace the mutable
latesttag with an exact, reviewed package version, for example:bash npx clawhub@<reviewed-exact-version> install habit-tracker-pro -
Verify the selected package version's publisher, provenance, release history, and registry integrity metadata before recommending it.
-
Where the surrounding package workflow supports it, use a committed lockfile and integrity hashes to make dependency resolution reproducible.
-
Avoid executing newly downloaded packages directly in privileged environments. Perform installation under a least-privileged account or in a sandboxed environment.
-
Establish an update-review process so the pinned version is changed only after the new release has been inspected and approved.
-
Document the expected package source and version so users can detect unexpected registry or dependency resolution.
-
