T08 · Insecure Dependencies
- Location
SKILL.md:27- Finding
Unpinned Global npm Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 27-31 and 41-44
Vulnerability Type: Unpinned third-party package installation
Risk Level: MediumVulnerable Code
yaml install: - kind: npm package: picture-it bins: - picture-itbash # Install (pick one) npm install -g picture-it pnpm add -g picture-it bun install -g picture-itTechnical Analysis
The skill directs users or an agent runtime to install
picture-itfrom the npm registry without specifying an exact version or verifying package integrity. Consequently, installation resolves to whichever release is current at execution time rather than the version reviewed alongside this skill.Global npm package installation may execute package lifecycle scripts with the privileges of the invoking user. The installed package and its transitive dependency graph can also change independently of this skill. This creates a supply-chain exposure if the publisher account, registry package, or a transitive dependency is compromised.
Although the skill metadata declares version
0.2.1, the installation instructions do not constrain installation to that version. No malicious dependency is confirmed; the vulnerability is the unsafe, mutable dependency acquisition process.Attack Path
- An attacker compromises the
picture-itpublisher account, package release process, or a dependency included by a future release. - The attacker publishes a malicious package version to the npm registry.
- A user or agent follows the documented unpinned command, such as
npm install -g picture-it. - The package manager resolves and downloads the attacker-controlled release.
- Malicious lifecycle code executes during installation, or malicious application code executes when
picture-itis subsequently invoked. - The payload operates with the invoking user's privileges and may access files, environment variables, and configuration available to that account.
Impa
...[truncated 631 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
-
Pin the package to an exact reviewed version in both metadata and examples:
yaml install: - kind: npm package: picture-it@0.2.1 bins: - picture-itbash npm install --global --save-exact picture-it@0.2.1 -
Prefer a project-local installation governed by a committed lockfile over a global installation:
bash npm install --save-exact picture-it@0.2.1 npx picture-it@0.2.1 --help -
Verify registry provenance and published integrity before approving version updates. Review package lifecycle scripts and the resolved transitive dependency tree.
-
Use lockfile-enforcing installation modes, such as
npm ci, in automated environments. -
Run the CLI under a least-privileged account. Do not install it with
sudoor an administrative shell. -
Expose
FAL_KEYonly to the process that requires it and avoid retaining unrelated secrets in the same execution environment. -
Establish a controlled dependency-update process in which new versions are reviewed and tested before changing the pinned version.
-
