T08 · Insecure Dependencies
- Location
SKILL.md:84- Finding
Unpinned Global Installation of a Third-Party npm Package
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 84
Vulnerability Type:T08: Insecure Dependencies
Risk Level: MediumVulnerable Code Snippet:
bash npm install -g playwriter@latestTechnical Analysis
The installation instruction uses the mutable
latestnpm distribution tag rather than a reviewed, exact package version. Consequently, the installed code can change without any corresponding modification to this skill.npm packages may define lifecycle scripts that execute during installation. Because the command performs a global installation, such scripts run with the privileges of the user invoking npm and can modify files or install additional components accessible to that account. If the package, its publishing account, or one of its transitive dependencies is compromised, following this instruction could execute attacker-controlled code.
The audited file does not contain evidence that the current
playwriterpackage is malicious. The vulnerability is the unsafe and non-reproducible dependency installation practice.Attack Path
- An attacker compromises the npm package, a maintainer account, or a transitive dependency.
- The attacker publishes a malicious release and assigns it to the
latestdistribution tag. - A user follows the skill documentation and runs
npm install -g playwriter@latest. - npm downloads the attacker-controlled release and may execute its installation lifecycle scripts.
- The malicious package executes with the installing user's privileges and can access resources available to that user.
Impact Assessment
Successful exploitation could provide arbitrary code execution under the privileges of the user performing the installation. The attacker could read or alter user-accessible files, steal environment credentials, install additional malicious packages, or tamper with globally installed command-line tools.
The affected scope is generally ...[truncated 220 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace
@latestwith a reviewed, exact version, for example:bash npm install --save-exact playwriter@<reviewed-version> - Prefer a project-local dependency over a global installation and commit a lockfile to make dependency resolution reproducible.
- Verify the package name, publisher, provenance, signatures, and integrity metadata against the official Playwriter distribution channel.
- Audit the package and its transitive dependencies before approving version upgrades.
- Where compatible with the package, disable lifecycle scripts during installation:
bash npm install --ignore-scripts --save-exact playwriter@<reviewed-version> - Perform installation without administrative privileges and in an isolated environment to limit the consequences of a supply-chain compromise.
- Use automated dependency monitoring and require explicit review before updating the pinned version.
- Replace
