T08 · Insecure Dependencies
- Location
SKILL.md:23- Finding
Unpinned Global Installation of an Unreviewed Third-Party Package
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 23-33
Vulnerability Type: Supply-chain exposure through an unpinned globally installed dependency
Risk Level: MediumVulnerable Code
markdown npm ```bash npm install -g skills-weatherpnpm
bash pnpm add -g skills-weathertext ### Technical Analysis The installation instructions retrieve the latest available release of `skills-weather` from a third-party package registry without pinning an exact version or verifying an integrity digest. The `-g` option installs the package globally, potentially exposing the resulting executable across the user's environment. Package installation can execute lifecycle scripts such as `preinstall`, `install`, and `postinstall`. Consequently, a compromised registry account, malicious future release, or supply-chain compromise could cause attacker-controlled code to execute during installation. The artifact does not include the declared `index.js` entry point, a lockfile, package metadata, or the dependency implementation, so the installed behavior cannot be verified against the reviewed content. ### Attack Path 1. An attacker compromises the upstream package, its publisher account, or its release process. 2. The attacker publishes a malicious version under the existing `skills-weather` package name. 3. A user follows the documented command without specifying an audited version. 4. The package manager resolves and downloads the malicious release. 5. Malicious lifecycle scripts may execute during installation, or malicious code runs when the globally installed command is invoked. 6. The payload operates with the privileges of the user performing the installation. ### Impact Assessment Successful exploitation could permit arbitrary code execution with the installing user's privileges. Depending on those privileges, the attacker could access user-readable files and credentials, modify use ...[truncated 214 chars]- Remediation
View remediation
Remediation Suggestions
- Pin the package to a specific audited version, for example
skills-weather@1.0.3, rather than implicitly installing the latest release. - Verify the package with a trusted integrity digest or signed provenance before installation.
- Include the actual implementation, package manifest, and lockfile in the reviewed artifact so its behavior and dependency tree can be audited.
- Prefer a project-local installation over a global installation to reduce scope and avoid replacing globally available commands.
- Install with lifecycle scripts disabled where compatible, then explicitly review and run any required setup steps.
- Use a trusted registry and enable package-manager controls for provenance, vulnerability scanning, and lockfile enforcement.
- Perform installation under a non-privileged account and avoid
sudoor administrator elevation.
- Pin the package to a specific audited version, for example
