T08 · Insecure Dependencies
- Location
SKILL.md:41- Finding
Unpinned npm CLI Installation and Execution
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 41–42
Vulnerability Type: Unpinned third-party executable dependency
Risk Level: MediumVulnerable Code:
bash npm i -g @runcomfy/cli # global install npx -y @runcomfy/cli --version # zero-installTechnical Analysis
The skill instructs operators or agents to install and execute
@runcomfy/cliwithout specifying an exact reviewed version or verifying package integrity. Both commands resolve mutable content from the npm registry. In particular,npx -ycan download and execute the currently resolved package without interactive confirmation.The implementation of
@runcomfy/cliis not included in this project and was therefore outside the auditable code boundary. npm packages can execute code through package lifecycle scripts and CLI entry points. Consequently, a compromised maintainer account, malicious package release, registry compromise, or unexpected future release could introduce arbitrary code after this skill has already been reviewed.Attack Path
- An attacker compromises the npm package, its publisher account, or its distribution channel and publishes a malicious release under
@runcomfy/cli. - An operator or agent follows the documented installation command without selecting a fixed version.
- npm resolves the attacker-controlled release.
npm i -gexecutes applicable lifecycle scripts and installs the package globally, ornpx -ydownloads and runs its CLI without requiring approval.- The malicious package executes with the privileges and environment of the invoking user.
- It may read accessible files and environment variables, including
RUNCOMFY_TOKEN, modify user-level files, or perform unauthorized network activity.
Impact Assessment
Successful exploitation could provide arbitrary code execution under the invoking user's account. The accessible s ...[truncated 353 chars]
- An attacker compromises the npm package, its publisher account, or its distribution channel and publishes a malicious release under
- Remediation
View remediation
Remediation Suggestions
- Pin the CLI to an exact reviewed version, for example
@runcomfy/cli@X.Y.Z, rather than resolving the latest release. - Record and verify the expected package integrity hash before installation.
- Prefer a lockfile-backed local installation using a trusted internal or controlled registry mirror.
- Remove or discourage unattended
npx -yexecution because it automatically approves downloading and running mutable code. - Review the selected package version, including lifecycle scripts, transitive dependencies, and executable entry points.
- Run the CLI as an unprivileged user in a sandbox or container with access limited to the required output directory and network endpoints.
- Supply
RUNCOMFY_TOKENonly for the command that requires it and avoid exposing unrelated secrets in the process environment. - Establish an update process in which new CLI versions are reviewed and their integrity values updated deliberately.
- Pin the CLI to an exact reviewed version, for example
