T08 · Insecure Dependencies
- Location
SKILL.md:20- Finding
Unpinned Global Installation of a Third-Party Executable
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 20-23
Vulnerability Type: Unpinned third-party dependency installation
Risk Level: HighVulnerable Code Snippet:
sh npm install -g @kilocode/cliTechnical Analysis
The installation command retrieves the current version of
@kilocode/clifrom the npm registry and installs it globally. It does not specify an exact audited version, use a lockfile, or verify the downloaded package's integrity.Consequently, the code that executes on a user's system can change after this skill has been reviewed. A compromised package release, maintainer account, or upstream dependency could introduce arbitrary behavior. Global installation increases the potential effect because the executable becomes available across the user's environment rather than remaining isolated to the project.
Attack Path
- An attacker compromises the package, its publishing account, or an upstream dependency.
- The attacker publishes a malicious version under the existing package name.
- A user follows the skill instructions and runs
npm install -g @kilocode/cli. - npm retrieves and installs the attacker-controlled release.
- The user or agent subsequently invokes
kilo run. - The malicious executable runs with the invoking user's privileges and may access inherited environment variables, repositories, files, and network resources.
Impact Assessment
Successful exploitation permits arbitrary code execution with the privileges of the user running npm or Kilo CLI. The affected scope can include local source repositories, user-accessible files, inherited credentials such as
GITHUB_TOKEN, and remote services reachable with those credentials. A privileged global installation could increase the system-wide impact.- Remediation
View remediation
Remediation Suggestions
- Pin the CLI to an exact, reviewed version, for example
@kilocode/cli@X.Y.Z. - Prefer a project-local installation rather than a global installation.
- Commit and enforce a lockfile that records transitive dependency versions and integrity hashes.
- Verify package provenance, publisher identity, signatures, and checksums where supported.
- Run the CLI in a restricted environment with only the repository and credentials required for the task.
- Establish an explicit review and upgrade process instead of automatically consuming the latest release.
- Pin the CLI to an exact, reviewed version, for example
