T08 · Insecure Dependencies
- Location
SKILL.md:82- Finding
Unpinned Third-Party Package Installed Globally
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 82–88
Vulnerability Type: Unpinned and globally installed third-party dependency
Risk Level: MediumVulnerable Code
sh command -v webfetchIf it is not installed, execute:
sh npm install -g @lyhue1991/webfetchTechnical Analysis
The Skill instructs the Agent to install
@lyhue1991/webfetchglobally without specifying an exact reviewed version, integrity hash, lockfile, or provenance verification. npm will therefore resolve the package version from the registry at installation time.Because npm packages can contain lifecycle scripts that execute during installation, a compromised package account, malicious future release, or compromised registry response could cause arbitrary code to run under the identity performing the installation. Global installation also makes the package available outside this individual project and can modify globally accessible executables.
The reviewed project does not include evidence that the named dependency is currently malicious. The vulnerability is the unsafe dependency acquisition and installation process.
Attack Path
- The Agent checks for
webfetchand determines that it is not installed. - The Agent follows the Skill instructions and runs
npm install -g @lyhue1991/webfetch. - npm resolves the current package release dynamically because no exact version or integrity value is specified.
- An attacker who has compromised the package, publisher account, or distribution channel provides a malicious release.
- Malicious lifecycle scripts can execute during installation, or malicious package logic can execute when the Agent subsequently invokes
webfetch. - The payload runs with the permissions of the installing or invoking user.
Impact Assessment
Successful exploitation could allow arbitrary code execution with the privileges of the user running npm or
webfetch. ...[truncated 493 chars]- The Agent checks for
- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to an exact, reviewed version rather than resolving the latest release dynamically.
- Record and verify the expected package integrity hash and publisher provenance.
- Use a lockfile and a trusted npm registry configuration.
- Prefer a project-local, isolated installation over
npm install -g. - Run the package with a dedicated low-privilege account or in a restricted container.
- Disable lifecycle scripts during installation where compatible, for example with
npm install --ignore-scripts, and separately review any scripts that are required. - Review the package source, transitive dependencies, ownership history, and release artifacts before approving it.
- Document a known-good version and controlled upgrade process.
