T08 · Insecure Dependencies
- Location
SKILL.md:17- Finding
Unpinned Global npm Package Installation and Installer Execution
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 17-19
Vulnerability Type: Unpinned third-party dependency installation and execution
Risk Level: MediumVulnerable Code:
bash npm install -g agent-browser agent-browser install agent-browser install --with-depsTechnical Analysis
The installation instructions globally install
agent-browserwithout specifying an exact, reviewed version. npm may therefore resolve the command to a package release that did not exist when this skill was audited. npm installation can execute package lifecycle scripts, and the subsequentagent-browser installcommands execute code supplied by the installed package.The
--with-depsoperation may also install browser-related system dependencies. Its precise privileges depend on the operating system and environment, but it potentially has a broader effect than a project-local package installation. The finding is a supply-chain weakness rather than evidence that the currently referenced package is malicious.Attack Path
- An attacker compromises the
agent-browsernpm package, one of its transitive dependencies, or the relevant publisher account. - The attacker publishes a malicious version that satisfies the unpinned package request.
- A user follows the documented
npm install -g agent-browserinstruction. - npm downloads the uncontrolled version and may run attacker-controlled lifecycle scripts.
- The user subsequently executes
agent-browser installoragent-browser install --with-deps, providing another opportunity for attacker-controlled code to run. - The payload performs actions with the permissions of the invoking user and potentially affects global tooling or system dependencies.
Impact Assessment
Successful exploitation could provide arbitrary code execution with the invoking user's privileges. The attacker could access files available to that account, steal browser or de ...[truncated 246 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
- Pin
agent-browserto an exact, reviewed version, for examplenpm install -g agent-browser@<reviewed-version>. - Prefer a project-local installation governed by a committed lockfile instead of a global installation.
- Use
npm cifor source-based installations so dependency resolution matches the reviewed lockfile. - Verify package provenance and integrity before installation, including the publisher, registry source, release signatures or attestations, and expected package hashes where available.
- Review npm lifecycle scripts and the behavior of
agent-browser installbefore execution. - Avoid
--with-depsunless system dependencies are genuinely required. Document the packages and privileges it needs. - Run installation in a sandbox, container, or otherwise minimally privileged environment.
- Establish a controlled dependency-update process in which new versions are reviewed and tested before the documented version is changed.
- Pin
