T08 · Insecure Dependencies
- Location
SKILL.md:49- Finding
Unpinned Global Installation of a Third-Party npm Package
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 49
Vulnerability Type: Unpinned global third-party dependency installation
Risk Level: MediumComplete Code Snippet:
bash npm i -g @fly-ai/flyai-cliTechnical Analysis
The Skill instructs users to globally install the latest available version of
@fly-ai/flyai-cli. No reviewed version, lockfile, integrity hash, or provenance requirement is specified.Because npm installation can execute package lifecycle scripts, a compromised publisher account, malicious future release, or compromised transitive dependency could execute code with the privileges of the user running the installation. The global
-gscope also gives the package broader and more persistent system exposure than a project-local or isolated installation.This finding does not establish that the current package is malicious. The vulnerability is the unsafe trust and installation model, which permits the package contents to change after the Skill has been reviewed.
Attack Path
- An attacker compromises the npm publisher account, package release process, or a transitive dependency.
- The attacker publishes a malicious version that becomes the latest resolvable release.
- A user follows the Skill instructions and runs the unpinned global installation command.
- npm downloads the attacker-controlled release.
- Malicious package code or lifecycle scripts execute with the invoking user's permissions.
- The installed global executable can remain available for subsequent invocations and may access files, credentials, network resources, and processes available to that user.
Impact Assessment
Successful exploitation could provide arbitrary code execution under the account performing the installation. Depending on that account's privileges, the attacker could access user-readable files and credentials, modify user-owned configuration, communicate with external ser ...[truncated 350 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to a specific, reviewed version rather than resolving the latest release:
bash npm install --save-exact @fly-ai/flyai-cli@REVIEWED_VERSION - Prefer a project-local installation over
-g, and invoke the binary from the local dependency context. - Commit and enforce a lockfile with integrity metadata where the deployment model permits it.
- Verify npm provenance, publisher identity, package signatures, and integrity before installation.
- Audit both the direct package and its transitive dependency tree.
- Disable lifecycle scripts during installation unless the reviewed package explicitly requires them:
bash npm install --ignore-scripts --save-exact @fly-ai/flyai-cli@REVIEWED_VERSION - Run the CLI in a least-privileged container or sandbox with narrowly scoped filesystem and network access.
- Document a controlled upgrade process so new releases are reviewed before changing the pinned version.
- Avoid running npm installation commands with administrator or root privileges.
- Pin the dependency to a specific, reviewed version rather than resolving the latest release:
