T08 · Insecure Dependencies
- Location
2chat-whatsapp/PUBLISH.md:19- Finding
Unpinned Global Installation of a Third-Party Publishing Tool
- Content
View full analysis
Vulnerability Details
File Location:
2chat-whatsapp/PUBLISH.md:19-21
Vulnerability Type: Unpinned third-party dependency installed globally
Risk Level: MediumVulnerable Code:
bash npm i -g clawhub # or: pnpm add -g clawhubTechnical Analysis
The publishing instructions install the latest available version of the
clawhubnpm package globally without pinning an exact version or verifying package integrity. Because the resolved package can change over time, users following the same instructions may execute code that was not present or reviewed when this Skill was audited.npm packages can define lifecycle scripts that execute during installation. A compromised package, malicious future release, or compromised transitive dependency could therefore run arbitrary commands under the privileges of the user performing the installation. Global installation also places executables in shared system or user-level locations, increasing the potential scope of package tampering.
This finding is limited to the publishing workflow documented in
PUBLISH.md; the Skill itself does not automatically run this installation command.Attack Path
- An attacker compromises the
clawhubnpm package, one of its transitive dependencies, or its publishing account. - The attacker publishes a malicious version that becomes the version selected by the unpinned install command.
- A maintainer follows the documented
npm i -g clawhuborpnpm add -g clawhubinstruction. - The package manager downloads the mutable latest release without a repository-controlled lockfile or explicit integrity validation.
- Malicious package code or lifecycle scripts execute with the maintainer's current privileges.
- The compromised tool may steal publishing credentials, modify files, tamper with globally installed commands, or publish altered Skill artifacts.
Impact Assessment
Successful exploitation could obtain ...[truncated 671 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
- Pin the publishing tool to a reviewed exact version, for example
clawhub@1.2.3, rather than resolving the latest release. - Prefer a repository-local development dependency recorded in
package.jsonand protected by a committed lockfile. - Use deterministic installation such as
npm ciin controlled publishing environments. - Verify the package source, published integrity hash, signatures, and provenance before upgrading.
- Avoid global installation where possible; invoke the pinned local executable through a package script.
- Disable package lifecycle scripts with
--ignore-scriptswhen the tool supports installation without them. - Run publication from an isolated, least-privileged environment with narrowly scoped, short-lived credentials.
- Document a controlled dependency-update process that reviews release notes and package changes before changing the pinned version.
- Pin the publishing tool to a reviewed exact version, for example
