T08 · Insecure Dependencies
- Location
- SKILL.md:17
- Finding
- Unpinned Global npm Package Installation and Installer Execution## Vulnerability Details **File Location**: `SKILL.md`, lines 17-19 **Vulnerability Type**: Unpinned third-party dependency installation and execution **Risk Level**: Medium **Vulnerable Code**: ```bash npm install -g agent-browser agent-browser install agent-browser install --with-deps ``` ### Technical Analysis The installation instructions globally install `agent-browser` without 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 subsequent `agent-browser install` commands execute code supplied by the installed package. The `--with-deps` operation 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 1. An attacker compromises the `agent-browser` npm package, one of its transitive dependencies, or the relevant publisher account. 2. The attacker publishes a malicious version that satisfies the unpinned package request. 3. A user follows the documented `npm install -g agent-browser` instruction. 4. npm downloads the uncontrolled version and may run attacker-controlled lifecycle scripts. 5. The user subsequently executes `agent-browser install` or `agent-browser install --with-deps`, providing another opportunity for attacker-controlled code to run. 6. 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]
- Remediation
- ## Remediation Suggestions - Pin `agent-browser` to an exact, reviewed version, for example `npm install -g agent-browser@<reviewed-version>`. - Prefer a project-local installation governed by a committed lockfile instead of a global installation. - Use `npm ci` for 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 install` before execution. - Avoid `--with-deps` unless 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.
