T08 · Insecure Dependencies
- Location
reference/core-workflow.md:3- Finding
Mandatory Installation of an Unpinned Global Dependency
- Content
View full analysis
Vulnerability Details
File Location:
reference/core-workflow.md:3-8
Vulnerability Type: Unpinned global package installation and supply-chain exposure
Risk Level: Highbash npm install -g @fly-ai/flyai-cli@latest --registry=https://registry.npmjs.orgTechnical Analysis
The workflow requires installing or upgrading
@fly-ai/flyai-clibefore performing a search. The mutablelatesttag is used instead of an audited exact version, and no package integrity digest or lockfile is provided.Consequently, the code installed when the Skill runs may differ from the code that existed when the Skill was audited. npm packages can contain installation lifecycle scripts, such as
preinstall,install, andpostinstall, which execute during installation. A compromised publisher account, malicious package release, or upstream package compromise could therefore introduce arbitrary executable behavior.Global installation also modifies the user's shared executable environment rather than isolating the dependency to this Skill.
Attack Path
- An attacker compromises the npm publisher, package, or release pipeline for
@fly-ai/flyai-cli. - The attacker publishes a malicious release and assigns it the
latesttag. - A user invokes a workflow that requires a FlyAI search.
- The Skill directs the environment to run the global installation command.
- npm downloads the attacker-controlled release.
- Malicious lifecycle scripts execute during installation, or the installed
flyaiexecutable runs malicious code when subsequently invoked.
Impact Assessment
Successful exploitation permits arbitrary code execution with the privileges of the account running npm. The malicious package could read or modify user-accessible files, access environment variables and credentials available to that account, tamper with globally installed commands, or make unauthorized network requests.
The impact becomes s ...[truncated 90 chars]
- An attacker compromises the npm publisher, package, or release pipeline for
- Remediation
View remediation
Remediation Suggestions
- Replace
@latestwith one audited, exact package version. - Record and verify the package integrity digest.
- Use a lockfile and a local project dependency rather than a global installation.
- Do not automatically upgrade the dependency whenever the Skill is invoked.
- Require explicit user approval before installing any external software.
- Disable npm lifecycle scripts where compatible with the package.
- Run the dependency in a restricted sandbox or container with minimal filesystem and network access.
- Establish a controlled dependency-update process that performs security review before changing the pinned version.
- Replace
