T08 · Insecure Dependencies
- Location
SKILL.md:42- Finding
Unpinned Third-Party CLI Installation and Automatic Execution
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 42
Vulnerability Type: Unpinned third-party dependency installation and execution
Risk Level: Mediumbash npm i -g @runcomfy/cli # or: npx -y @runcomfy/cli --versionTechnical Analysis
The documented commands retrieve the current version of
@runcomfy/clifrom the configured npm registry without specifying an exact version or verifying an integrity hash. Thenpm i -gvariant installs the package globally, whilenpx -yretrieves and executes the resolved package without interactive confirmation.npm packages can run lifecycle scripts during installation. Consequently, a compromised publisher account, malicious future package release, dependency-chain compromise, or compromised package registry could cause attacker-controlled code to execute when these instructions are followed. The reviewed skill does not itself contain a malicious payload, and the package name is consistent with the declared RunComfy service; the risk arises from executing mutable, unverified third-party content.
Attack Path
- An attacker compromises the package publisher, a transitive dependency, or the package distribution channel.
- The attacker publishes a malicious version that is selected by npm as the current release.
- A user or agent follows the installation command in
SKILL.md. - npm downloads the unpinned package and may execute its installation lifecycle scripts.
- The malicious code executes with the privileges and environment of the invoking user.
Impact Assessment
Successful exploitation could provide arbitrary code execution under the invoking user's account. Depending on that account's access, the payload could read accessible files and environment variables, capture RunComfy or other credentials, access images being processed, modify user-owned files, or install additional user-level components. Global installation also modifies a s ...[truncated 218 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the CLI to a reviewed exact version, for example
@runcomfy/cli@X.Y.Z, rather than resolving the mutable latest release. - Publish and verify the expected npm integrity digest or package provenance before installation.
- Prefer a project-local dependency managed through a committed lockfile instead of global installation.
- Remove the automatic-confirmation
npx -yexample, or require explicit verification before first execution. - Disable lifecycle scripts during package acquisition where operationally possible, then review the package before enabling any required installation steps.
- Document a trusted registry configuration and recommend checking package ownership, signatures, and provenance.
- Establish a controlled update process in which new versions are reviewed and tested before changing the pinned version.
- Pin the CLI to a reviewed exact version, for example
