T08 · Insecure Dependencies
- Location
references/agent-browser-overview.md:17- Finding
Unpinned Package Retrieval and Execution via npx
- Content
View full analysis
Vulnerability Details
File Location:
references/agent-browser-overview.md, line 17
Vulnerability Type: Unpinned third-party dependency execution
Risk Level: MediumVulnerable Code Snippet
markdown - Linux dependencies (if needed): - `agent-browser install --with-deps` - or `npx playwright install-deps chromium`Technical Analysis
The documented
npx playwright install-deps chromiumcommand does not specify an exact Playwright version. If Playwright is unavailable locally,npxcan retrieve and execute the currently resolved package from the configured npm registry.This creates a mutable supply-chain execution path: the package executed when a user follows the instructions may differ from the package available when the skill was audited. A compromised upstream release, registry account, registry configuration, or package-resolution environment could therefore cause attacker-controlled package code to execute locally.
The command is particularly sensitive because
install-depsinstalls operating-system dependencies and may prompt users to authorize elevated operations. Although the surrounding documentation advises users not to run with elevated privileges, the command itself does not provide integrity verification or enforce isolation.Attack Path
- An attacker compromises a relevant npm publisher, release process, registry, or package-resolution environment.
- A malicious or unexpectedly altered Playwright version becomes the version resolved by the unpinned
npx playwrightinvocation. - A user follows the setup instructions on a Linux host.
npxdownloads and executes package-controlled code.- The malicious package runs with the invoking user's privileges and may leverage any elevation the user grants during dependency installation.
Impact Assessment
Successful exploitation could provide arbitrary code execution with the privileges of the user invoking
npx. This could permit access to that u ...[truncated 401 chars]- Remediation
View remediation
Remediation Suggestions
-
Replace the command with an exact, reviewed version, for example:
bash npx --yes playwright@<audited-exact-version> install-deps chromium -
Prefer installing from a lockfile-controlled project dependency and invoking the already installed local binary rather than allowing on-demand package resolution.
-
Configure npm to use a trusted registry and verify package provenance and integrity before execution.
-
Review and deliberately update the pinned version instead of automatically tracking the latest release.
-
Run installation inside a dedicated container, virtual machine, or otherwise isolated environment.
-
Use a non-privileged account and do not grant administrative privileges unless the exact system-level operations have been reviewed.
-
Where feasible, use a prebuilt and verified environment containing the required browser and operating-system dependencies.
-
