T08 · Insecure Dependencies
- Location
SKILL.md:127- Finding
Unpinned Global Installation of a Third-Party npm Package
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 127
Vulnerability Type: Unpinned third-party dependency installed globally
Risk Level: MediumComplete Code Snippet:
sh pnpm add -g @leeguoo/blog-publishTechnical Analysis
The skill instructs users or agents to globally install
@leeguoo/blog-publishwithout specifying an exact version, lockfile, package integrity hash, or provenance verification. The effective code executed by this instruction can therefore change after the skill has been reviewed.Package installation may execute npm lifecycle scripts, and subsequent use of the installed CLI executes code supplied by the package and its transitive dependencies. Because the package implementation is not included in the audited project, its behavior cannot be verified from this artifact. Global installation also makes the command available outside the immediate project context.
This is a supply-chain weakness rather than evidence that the named package is currently malicious.
Attack Path
- An attacker compromises the npm publisher account, package release process, or a transitive dependency.
- The attacker publishes a malicious version that satisfies the unpinned installation request.
- A user or automation agent follows the skill instruction and runs the global installation command.
pnpmretrieves the attacker-controlled release and may execute its lifecycle code.- The installed CLI subsequently runs with the invoking user's privileges.
- Malicious code could inspect accessible files, environment variables, or publishing credentials and perform unauthorized local or network operations.
Impact Assessment
Successful exploitation could execute arbitrary code with the privileges of the user or CI identity running
pnpm. The accessible scope may include local content, environment variables such as publishing tokens, account-level publishing capabilities, and othe ...[truncated 135 chars]- Remediation
View remediation
Remediation Suggestions
- Pin the package to an exact, reviewed version, for example
@leeguoo/blog-publish@X.Y.Z. - Prefer a project-local development dependency over a global installation.
- Commit a lockfile and use a frozen or immutable installation mode in automation.
- Verify npm package provenance, release signatures, and integrity metadata before installation.
- Disable lifecycle scripts during installation when they are unnecessary, then explicitly review any required scripts.
- Run the CLI in a sandbox or least-privileged CI job with narrowly scoped publishing credentials.
- Establish an upgrade process that reviews and tests each new package version before changing the pin.
- Pin the package to an exact, reviewed version, for example
