T08 · Insecure Dependencies
- Location
skill.md:11- Finding
Unpinned Global Installation of a Third-Party npm Package
- Content
View full analysis
Vulnerability Details
File Location:
skill.md, line 11
Vulnerability Type: Unpinned and globally installed third-party dependency
Risk Level: MediumVulnerable Code
bash npm install -g agent-browserTechnical Analysis
The skill instructs users to install the
agent-browsernpm package globally without specifying an exact reviewed version. The project also provides no lockfile, package integrity hash, signature-verification procedure, or trusted registry restriction.Consequently, npm resolves the package version at installation time. The installed implementation can therefore differ from the implementation originally reviewed. Installation may also run npm lifecycle scripts with the permissions of the invoking user. Because the package is installed globally, its executable becomes available outside this project and may replace or shadow an existing command with the same name.
The audited project contains only documentation and metadata, so the source code of the external npm package cannot be verified from this artifact.
Attack Path
- An attacker compromises the npm package, its maintainer account, or its publication pipeline and publishes a malicious release.
- A user follows the prerequisite in
skill.mdand runsnpm install -g agent-browser. - npm resolves the attacker-controlled release because no exact version is pinned.
- Malicious lifecycle scripts may execute during installation, or a malicious
agent-browserexecutable may be installed globally. - The user or agent subsequently invokes
agent-browserfor browser automation. - The malicious package executes with the privileges and environment access of the invoking account.
Impact Assessment
Successful exploitation could permit arbitrary code execution under the installing or invoking user's privileges. Depending on that account's permissions, the malicious package could access local files, environment variables, browser state, cookies, stor ...[truncated 369 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to an exact version that has been reviewed, rather than resolving the latest release:
bash npm install --save-exact agent-browser@<reviewed-version> - Prefer a project-local installation over
npm install -gto limit the package's scope and execute it through a controlled package script or an explicitly resolved local binary. - Commit a lockfile containing npm integrity metadata and require reproducible installation with
npm ci. - Restrict installation to an explicitly configured trusted npm registry.
- Verify package provenance, publisher identity, signatures, and integrity before installation.
- Disable lifecycle scripts during installation where compatible:
bash npm ci --ignore-scripts - If lifecycle scripts are required, review those scripts and the complete transitive dependency tree before permitting execution.
- Run browser automation in a sandbox or dedicated low-privilege account without unnecessary access to host files, secrets, or unrelated browser profiles.
- Pin the dependency to an exact version that has been reviewed, rather than resolving the latest release:
