T08 · Insecure Dependencies
- Location
SKILL.md:25- Finding
Unpinned Global Installation of a Third-Party CLI Package
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 25
Vulnerability Type: Unpinned third-party dependency installed globally
Risk Level: MediumVulnerable Code Snippet:
markdown 1. **Install CLI**: `npm i -g @fly-ai/flyai-cli`Technical Analysis
The setup instruction installs
@fly-ai/flyai-cliglobally without specifying an exact version, validating an integrity hash, or using a reviewed lockfile. Consequently, npm resolves the package version available from the configured registry at installation time rather than a version represented by the audited project.npm packages may execute lifecycle scripts during installation. Because the command uses global installation, those scripts run with the permissions of the invoking user and can modify user-accessible files, install or replace global executables, and affect later command resolution. The audited repository therefore does not fully determine the code that users will execute.
No evidence establishes that the named package is currently malicious. The confirmed issue is the unsafe, mutable supply-chain installation practice and its exposure to future package compromise, registry compromise, or an unexpectedly changed release.
Attack Path
- An attacker compromises the package publisher account, registry distribution path, or a future release of
@fly-ai/flyai-cli. - The attacker publishes a modified package version containing a malicious npm lifecycle script or executable.
- A user follows
SKILL.mdand runsnpm i -g @fly-ai/flyai-cli. - npm resolves and downloads the attacker-controlled version because no exact version or integrity value is specified.
- Package lifecycle code executes with the invoking user's privileges during installation.
- The globally installed executable can also run attacker logic when subsequent
flyaicommands are invoked.
Impact Assessment
Successful exploitation could provide arbitra ...[truncated 546 chars]
- An attacker compromises the package publisher account, registry distribution path, or a future release of
- Remediation
View remediation
Remediation Suggestions
-
Pin the CLI to a reviewed exact version, for example:
bash npm install --save-exact @fly-ai/flyai-cli@<reviewed-version> -
Install it as a project-local dependency rather than globally, and invoke it through a package script or the local
node_modules/.binpath. -
Commit
package.jsonand a lockfile generated from the reviewed dependency graph. -
Use deterministic installation such as
npm ciand verify registry provenance and expected integrity metadata. -
Review the package, transitive dependencies, and lifecycle scripts before approving version upgrades.
-
Run installation and CLI commands as an unprivileged user in a constrained environment with only the network and filesystem access required for hotel searches.
-
Document the trusted npm registry and prohibit unreviewed registry overrides.
-
