T08 · Insecure Dependencies
- Location
SKILL.md:20- Finding
Unpinned Global Installation of a Third-Party npm Package
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 20–24
Vulnerability Type: Unpinned third-party dependency installed globally
Risk Level: MediumVulnerable Code
markdown ## Installation ```bash npm install -g acp-looptext ### Technical Analysis The installation instructions retrieve and globally install the latest version of the third-party `acp-loop` package from the npm registry. The package version and artifact integrity are not pinned, so the code installed by users may differ from the version that was available when this Skill was reviewed. npm packages can define lifecycle scripts that execute during installation with the permissions of the invoking user. Global installation also places an executable in the user's global command search path. Consequently, compromise of the npm publisher account, package, or distribution process could cause users following these instructions to execute attacker-controlled code or install a malicious replacement CLI. No evidence was found that the referenced package is currently malicious. The risk arises from the unpinned and mutable supply-chain dependency. ### Attack Path 1. An attacker compromises the `acp-loop` npm package, its publisher account, or its release process. 2. The attacker publishes a malicious release under the package's existing name and latest distribution tag. 3. A user follows the Skill's documented `npm install -g acp-loop` command. 4. npm downloads the attacker-controlled release without enforcing a reviewed version or expected integrity value. 5. Malicious lifecycle scripts may execute during installation, or a malicious `acp-loop` executable may be installed globally. 6. The malicious code executes with the invoking user's privileges when installation occurs or when the installed CLI is subsequently used. ### Impact Assessment Successful exploitation could permit arbitrary code execution with the privileges of ...[truncated 357 chars]- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to an exact version that has been reviewed, for example
npm install -g acp-loop@<reviewed-version>, rather than relying on the mutable latest release. - Record and verify the expected package provenance and integrity before installation. Where supported, use npm provenance attestations and verify the publisher and release metadata.
- Prefer a project-local installation with a lockfile over global installation, limiting changes to the user's global executable environment.
- Review package contents and lifecycle scripts before recommending a release.
- If lifecycle scripts are not required, install with
--ignore-scriptsand document any resulting functionality limitations. - Advise users not to execute the installation command with
sudo, root privileges, or another privileged account. - Establish a process to periodically reassess the pinned version and deliberately update it only after security review.
- Pin the dependency to an exact version that has been reviewed, for example
