T08 · Insecure Dependencies
- Location
references/run-guide.md:32- Finding
Unpinned Global Installation of a Third-Party npm Package
- Content
View full analysis
Vulnerability Details
File Locations:
references/run-guide.md:32references/windows-edge-fallback.md:10
Vulnerability Type: Unpinned and globally installed third-party dependency
Risk Level: MediumVulnerable Code:
bash npm install -g agent-browserTechnical Analysis
The documentation directs users to install the latest available version of the third-party
agent-browsernpm package globally. The dependency is not pinned to a reviewed version, and the instructions do not require a lockfile, integrity hash, package provenance check, or verification against an official source.Because npm packages can execute lifecycle scripts during installation, a compromised, malicious, or unexpectedly modified package release could execute code with the permissions of the user running npm. The global installation scope also increases the impact by placing package files and command shims in the user's global Node.js environment.
This is a supply-chain weakness rather than evidence that the current
agent-browserpackage is malicious. The risk arises because the effective code installed in the future can change after this Skill has been reviewed.Attack Path
- An attacker compromises the package publisher account, the npm package, or its transitive dependency chain.
- The attacker publishes a malicious release under the expected package name.
- A user follows the documented
npm install -g agent-browserinstruction. - npm resolves the mutable latest release rather than a previously reviewed version.
- Malicious package code or an installation lifecycle script executes under the user's account.
- The installed global executable may subsequently run whenever the user invokes
agent-browser.
Impact Assessment
Successful exploitation could provide arbitrary code execution with the privileges of the user running npm. Depending on that user's permissions and environment, an att ...[truncated 481 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin
agent-browserto an exact version that has been reviewed, rather than installing the mutable latest release. - Document the expected official npm registry entry and upstream source repository so users can verify package identity.
- Use a project-local dependency with a committed lockfile instead of a global installation.
- Verify the resolved package integrity and provenance before installation.
- Disable npm lifecycle scripts during installation where compatible, or inspect all required lifecycle scripts before allowing them to run.
- Run the dependency in a disposable, least-privileged environment without access to unrelated credentials or sensitive files.
- Establish a controlled update process in which new versions and transitive dependency changes are reviewed before the documented version is changed.
A hardened installation example should use a reviewed exact version:
bash npm install --save-exact agent-browser@<reviewed-version>The corresponding lockfile should be retained and verified in controlled deployments.
- Pin
