T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:15
- Finding
- Unpinned Global Installation of an External npm Package## Vulnerability Details **File Location**: `SKILL.md`, lines 15–18 **Vulnerability Type**: Supply-chain exposure through an unpinned third-party dependency **Risk Level**: Medium ### Vulnerable Code Snippet ```bash npm install -g agent-browser agent-browser install agent-browser install --with-deps ``` ### Technical Analysis The documented installation procedure globally installs `agent-browser` without specifying an exact audited version. Consequently, the command resolves whichever package version the npm registry currently serves under its default distribution tag. The installed CLI is then executed through `agent-browser install` or `agent-browser install --with-deps`. If a future package release, package-maintainer account, publication pipeline, or transitive dependency is compromised, following these instructions could execute attacker-controlled package lifecycle code or CLI code. Global installation increases the potential scope by placing the executable in the user's global command environment. The `--with-deps` operation can also install browser-related system dependencies and may prompt users to grant elevated privileges, depending on the host platform and upstream implementation. The alternative source installation in `SKILL.md` is similarly not pinned to a reviewed commit or signed release: ```bash git clone https://github.com/vercel-labs/agent-browser cd agent-browser pnpm install pnpm build agent-browser install ``` Although the repository URL is consistent with the documented upstream project, cloning the mutable default branch does not ensure that users build the same source revision that was reviewed. ### Attack Path 1. An attacker compromises the npm package maintainer, release pipeline, mutable distribution tag, upstream repository, or a transitive dependency. 2. The attacker publishes or introduces a malicious package version or source revision. 3. A user follows the documented unpinned installation procedure. 4. npm installs ...[truncated 1140 chars]
- Remediation
- ## Remediation Suggestions 1. Pin the dependency to an exact reviewed version: ```bash npm install -g agent-browser@X.Y.Z ``` 2. Record and verify npm package integrity and provenance information before installation. 3. Prefer a project-local, lockfile-controlled dependency or an isolated environment over a global installation. 4. Pin source-based installation to a reviewed commit hash or cryptographically verified signed release tag: ```bash git clone https://github.com/vercel-labs/agent-browser cd agent-browser git checkout --detach <reviewed-commit-hash> ``` 5. Use a frozen lockfile when installing source dependencies, such as `pnpm install --frozen-lockfile`. 6. Document the exact system changes and privilege requirements of `agent-browser install --with-deps`. 7. Advise users not to grant elevated privileges unless necessary and after reviewing the dependency-installation actions.
