T08 · Insecure Dependencies
- Location
SKILL.md:12- Finding
Unpinned npm Package Execution Through npx
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 12
Vulnerability Type: Unpinned third-party dependency execution
Risk Level: MediumVulnerable Code:
bash npx clawhub@latest install data-automation-serviceTechnical Analysis
The documented installation command directs
npxto retrieve and execute thelatestrelease of theclawhubnpm package. Because the dependency is not pinned to a reviewed version and no integrity value is specified, the code executed by this command can change after the Skill has been audited.npxcan download a package and execute its CLI code with the permissions of the invoking user. Package lifecycle behavior or CLI implementation in a compromised or unexpectedly modified future release could therefore execute arbitrary local commands. The file does not establish that the package is currently malicious; the finding concerns the unsafe and mutable supply-chain trust model.Attack Path
- An attacker compromises the npm package, its publisher account, or its release process, or causes a malicious release to become the version identified by
latest. - A user follows the installation instruction in
SKILL.md. npxresolves and downloads the attacker-controlled release.- The downloaded package's CLI or applicable lifecycle behavior executes under the user's account.
- The malicious release can perform actions permitted to that account, such as reading accessible files, modifying user-owned data, accessing available environment variables, or initiating network connections.
Impact Assessment
Successful exploitation could obtain arbitrary code execution with the privileges of the user running the command. The affected scope includes files, credentials, environment variables, network resources, and application data accessible to that user. If the command is run from a privileged account or in a broadly authorized CI environment, the impact could e ...[truncated 204 chars]
- An attacker compromises the npm package, its publisher account, or its release process, or causes a malicious release to become the version identified by
- Remediation
View remediation
Remediation Suggestions
- Replace
@latestwith an exact, reviewed package version. - Verify that the package name and publisher correspond to the official distribution source.
- Record and verify the package integrity hash where the installation workflow permits it.
- Review the package contents, CLI entry point, and lifecycle scripts before execution.
- Use a lockfile or other reproducible dependency mechanism rather than resolving a mutable release tag.
- Run installation with a non-privileged account in an isolated environment with only the filesystem, credential, and network access required for installation.
- Establish a controlled update process in which newer versions are separately reviewed before changing the pinned version.
- Replace
