T08 · Insecure Dependencies
- Location
SKILL.md:126- Finding
Unpinned Global Installation and Execution of a Third-Party npm Package
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 126–127
Vulnerability Type: Unpinned third-party dependency installed globally
Risk Level: MediumComplete Code Snippet:
bash npm install -g agent-browser agent-browser installTechnical Analysis
The installation instructions globally install
agent-browserwithout pinning an exact package version or verifying package integrity and provenance. The subsequent command executes the installed package. Therefore, the code that runs is determined by whichever release the npm registry resolves at installation time rather than by a version reviewed with this Skill.Global npm installation may execute package lifecycle scripts and places executable tooling in a globally accessible location. If the package, a transitive dependency, the publisher account, or the package distribution channel is compromised, attacker-controlled code could run with the permissions of the user performing the installation. No evidence establishes that the named package is currently malicious; the vulnerability is the unsafe, mutable dependency acquisition process.
Attack Path
- An attacker compromises the
agent-browserpackage, its publisher account, or a dependency in its supply chain. - The attacker publishes a malicious release or injects malicious installation/runtime behavior.
- A user or agent follows the documented command
npm install -g agent-browser. - npm resolves and installs the attacker-controlled version because no exact version or integrity value is specified.
- Malicious code executes through an npm lifecycle script, the installed CLI, or the subsequent
agent-browser installcommand. - The payload operates with the invoking user's permissions and may affect globally installed tooling or user-accessible data.
Impact Assessment
Successful exploitation could provide arbitrary code execution under the account performing the instal ...[truncated 442 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
- Pin
agent-browserto a reviewed exact version rather than allowing npm to resolve the latest release. - Record and verify package integrity and provenance using a lockfile, trusted registry configuration, checksums, signatures, or npm provenance attestations as applicable.
- Prefer a project-local installation in an isolated, least-privileged environment instead of modifying global tooling.
- Review the pinned package, its lifecycle scripts, and its transitive dependency tree before deployment.
- Disable npm lifecycle scripts during installation when they are unnecessary, and explicitly run only reviewed setup steps.
- Avoid executing installation commands with administrator or root privileges.
- Document the expected official package publisher and registry to reduce package-substitution and registry-confusion risks.
- Establish controlled dependency-update procedures so that new versions are reviewed and tested before adoption.
- Pin
