T08 · Insecure Dependencies
- Location
README.md:7- Finding
Unpinned npm Package Execution Through npx
- Content
View full analysis
Vulnerability Details
File Location:
README.md, lines 7–9
Vulnerability Type: Unpinned third-party package execution
Risk Level: MediumVulnerable Code Snippet:
bash npx clawhub@latest install calendar-managerTechnical Analysis
The documented installation procedure instructs users to execute the latest available release of the
clawhubnpm package. The@latesttag is mutable and does not identify a specific, previously audited package version. Consequently, the code executed by this command can change after the skill has been reviewed.npxmay download the selected package and execute its command-line entry point locally. If the upstream package, maintainer account, publishing pipeline, or npm distribution channel is compromised, a malicious release assigned to thelatesttag could run arbitrary code during installation. No malicious package payload is present in the audited project itself; the risk arises from dynamically trusting a mutable third-party dependency.Attack Path
- An attacker compromises the upstream npm package, a maintainer account, or its release pipeline.
- The attacker publishes a malicious
clawhubrelease and assigns it to the mutablelatestdistribution tag. - A user follows the README and runs
npx clawhub@latest install calendar-manager. npxretrieves the attacker-controlled release and executes its CLI entry point.- The malicious package performs actions using the privileges and environment of the invoking user.
Impact Assessment
Successful exploitation could permit arbitrary code execution with the privileges of the user running the installation command. Depending on that user's permissions and environment, the package could read or modify accessible files, access environment variables and developer credentials, alter project configuration, or initiate network connections.
The direct scope is the local account and resources ava ...[truncated 301 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace
@latestwith an exact, reviewed package version, for exampleclawhub@X.Y.Z. - Commit and verify the expected package integrity hash where the installation workflow supports integrity enforcement.
- Document the authoritative package registry and publisher identity so users can detect dependency-confusion or package-substitution attempts.
- Review the pinned package version, including lifecycle scripts and transitive dependencies, before recommending it.
- Use a lockfile or equivalent immutable dependency manifest in automated installation workflows.
- Avoid running the installer with administrative privileges and execute it in a restricted environment with only the permissions required for installation.
- Establish a controlled update process in which version changes are explicitly reviewed before the documented command is updated.
- Replace
