T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:16
- Finding
- Unpinned Third-Party Package Installation and Execution## Vulnerability Details **File Location**: `SKILL.md:16-18`; related instruction at `CONTRIBUTING.md:17` **Vulnerability Type**: Unpinned executable dependency and mutable package source **Risk Level**: Medium ### Vulnerable Code `SKILL.md:16-18`: ```bash npm install -g agent-browser agent-browser install agent-browser install --with-deps ``` `CONTRIBUTING.md:17`: ```bash npm install -g agent-browser@latest ``` ### Technical Analysis The documentation directs users to globally install and execute the current npm registry version of `agent-browser` without pinning an audited version or verifying package integrity. The explicit `@latest` instruction guarantees that the resolved package can change after this Skill has been reviewed. Installing an npm package can execute package-controlled lifecycle scripts. The subsequent `agent-browser install` commands also run code supplied by that mutable dependency and may retrieve or install additional browser and system components. Consequently, trust is transferred from the reviewed Skill package to the current state of an external package publication chain. This is a supply-chain weakness rather than evidence that the current upstream package is malicious. Exploitation requires compromise or malicious control of the package, its maintainer account, or its transitive dependency chain. ### Attack Path 1. An attacker compromises the npm package publication process, a maintainer account, or a dependency used by `agent-browser`. 2. The attacker publishes a malicious release under the package version selected by the unpinned or `@latest` specification. 3. A user follows the documented global installation command. 4. npm downloads the attacker-controlled release and may execute its lifecycle scripts. 5. The user invokes `agent-browser install` or `agent-browser install --with-deps`, executing additional package-controlled installation logic. 6. Malicious code operates ...[truncated 817 chars]
- Remediation
- ## Remediation Suggestions 1. Pin `agent-browser` to a specific version that has been reviewed, rather than using an unqualified package name or `@latest`. 2. Record and verify the expected package integrity hash before installation. 3. For source-based installation, pin a reviewed commit hash or signed release tag and use a committed lockfile. 4. Prefer project-local installation over global installation to limit scope and improve reproducibility. 5. Disable npm lifecycle scripts during initial installation where operationally possible, then explicitly run only reviewed setup operations. 6. Perform installation under a non-privileged account and avoid `sudo` or administrator execution. 7. Document all artifacts downloaded by `agent-browser install --with-deps` and provide verification instructions for them. 8. Use automated dependency monitoring and require review before changing the pinned version. 9. Update both `SKILL.md` and `CONTRIBUTING.md` so they consistently reference the same verified version.
