Back to skill

Security audit

Agent Browser Xiaoshu

Security checks for vulnerabilities and agentic risk

Overview

This browser automation skill is coherent, but it gives agents sensitive browser-session capabilities and recommends unpinned installation without enough warning or scoping.

Review before installing. Use pinned, trusted versions of agent-browser where possible, avoid running installation with elevated privileges, treat saved state files such as auth.json as secrets, avoid committing or sharing them, and use disposable test accounts for browser automation that involves logins, uploads, recordings, screenshots, or traces.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:17
Finding

Unpinned Third-Party Installation and Build Instructions

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 17–27
Vulnerability Type: Unpinned and mutable third-party dependencies
Risk Level: Medium

Vulnerable Code

bash
npm install -g agent-browser
agent-browser install
agent-browser install --with-deps
bash
git clone https://github.com/vercel-labs/agent-browser
cd agent-browser
pnpm install
pnpm build
agent-browser install

Technical Analysis

Both installation methods retrieve mutable upstream content without pinning a reviewed npm package version, repository commit, dependency graph, or artifact checksum. The npm command resolves the version selected by the registry at installation time. The source installation clones the current default branch and then executes package installation and build processes.

npm and pnpm installation can execute package lifecycle scripts. Therefore, a compromised upstream release, repository, maintainer account, or transitive dependency could cause attacker-controlled code to run on the user's system. The --with-deps option can increase exposure by installing additional browser or system dependencies.

The referenced package and repository are consistent with the Skill's stated browser-automation purpose. There is no evidence in the reviewed package that either upstream source is currently malicious; the risk arises from the mutable, unverified supply chain.

Attack Path

  1. An attacker compromises an upstream maintainer account, package release, repository, or transitive dependency.
  2. The attacker publishes malicious content under the otherwise legitimate dependency identity.
  3. A user follows the unpinned installation instructions in SKILL.md.
  4. npm or pnpm downloads the attacker-controlled version or dependency.
  5. Malicious lifecycle, dependency, or build code executes with the installing user's privileges.
  6. A compromised browser CLI may subsequently access data available d ...[truncated 731 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin the npm dependency to a specific reviewed version rather than allowing registry-time resolution:
    bash
    npm install -g agent-browser@<reviewed-version>
    
  2. Pin source installations to an exact reviewed commit or signed release tag:
    bash
    git clone https://github.com/vercel-labs/agent-browser
    cd agent-browser
    git checkout <reviewed-commit-sha>
    
  3. Publish trusted SHA-256 checksums or signature-verification instructions for release artifacts.
  4. Use and enforce a lockfile for source builds, including frozen-lockfile installation.
  5. Avoid elevated installation privileges wherever possible and document the privilege implications of agent-browser install --with-deps.
  6. Review package lifecycle scripts and the resolved transitive dependency graph before recommending each new version.
  7. Establish a controlled update process that reviews and tests new upstream releases before changing the pinned version.

T08 · Insecure Dependencies

Warning
Location
CONTRIBUTING.md:16
Finding

Recommendation to Install the Mutable Latest Package Release

Content
View full analysis

Vulnerability Details

File Location: CONTRIBUTING.md, lines 16–19
Vulnerability Type: Explicit installation of an unreviewed latest dependency version
Risk Level: Medium

Vulnerable Code

markdown
1. Install the latest version
   ```bash
   npm install -g agent-browser@latest
   ```

Technical Analysis

The contributor instructions explicitly select the mutable latest npm distribution tag. The package content obtained through this command can change after the Skill has been audited without any modification to this repository.

npm package installation may execute lifecycle scripts. A malicious or compromised release assigned to latest could therefore execute code during installation. Although the package identity appears consistent with the documented upstream CLI and there is no evidence that it is currently malicious, the instruction bypasses version pinning and prevents users from reliably reproducing a reviewed installation.

Attack Path

  1. An attacker compromises the package publisher or npm account, or otherwise causes a malicious release to receive the latest tag.
  2. A contributor follows the troubleshooting instruction in CONTRIBUTING.md.
  3. npm resolves agent-browser@latest to the compromised release.
  4. Package lifecycle or installed executable code runs with the contributor's privileges.
  5. The attacker may access local developer data or later intercept information handled through browser automation.

Impact Assessment

Exploitation could result in arbitrary code execution under the installing user's account. Accessible resources may include source repositories, developer credentials, environment variables, SSH or package-manager credentials available to that account, and browser data processed by the installed CLI.

The impact may become system-wide if installation is run with administrative privileges. The project itself does not instruct the user to use ` ...[truncated 73 chars]

Remediation
View remediation

Remediation Suggestions

  1. Replace @latest with an exact version that has been reviewed and tested:
    bash
    npm install -g agent-browser@<reviewed-version>
    
  2. Record the approved package version and integrity hash in the project documentation.
  3. Verify package provenance or signatures when supported by the release process.
  4. Review lifecycle scripts and dependency changes before approving an update.
  5. Advise contributors to install without administrative privileges and in an isolated environment where practical.
  6. Update the approved version through a documented review process rather than dynamically following the latest tag.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (7)

Self-Modification

High
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

Scanner excerpt · CONTRIBUTING.md (reported line 60)May include surrounding context.

md
## Adding New Commands to the Skill

Update SKILL.md when the upstream CLI adds new commands.
- Keep the Installation section
- Add new commands in the correct category
- Include usage examples

Context Window Stuffing

Medium
Category
Memory Poisoning
Confidence
85% confidence
Finding

Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.

Content

Scanner excerpt · SKILL.md (reported line 41)May include surrounding context.

agent-browser open # Navigate to page agent-browser snapshot -i # Get interactive elements with refs agent-browser click @e1 # Click element by ref agent-browser fill @e2 "text" # Fill input by ref agent-browser close # Close browser

text

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill advertises file upload, screenshot/PDF output, video recording, and trace capture without warning that these operations create local artifacts and may capture sensitive page contents, filesystem data, or credentials visible in the browser. For an AI agent, this increases the risk of silent data collection and persistence beyond the immediate task.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documentation states that recording preserves cookies and storage from the current session, but does not warn that this can expose authenticated state or private account data in the recording workflow. In practice, preserved session context can allow recordings or follow-on actions to occur under a user's logged-in identity, increasing privacy and account-takeover risk if artifacts or state are mishandled.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly documents saving and reusing authenticated browser state (auth.json) and handling credentials, but provides no warning that these artifacts may contain session cookies, tokens, or other secrets. In an agent context, this can lead to unintended long-lived credential persistence, reuse across tasks, or disclosure through logs, shared workspaces, or later exfiltration.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
94% confidence
Finding

The documented state save and state load commands enable persistent reuse of authenticated browser state across sessions. Without guardrails or warnings, this can preserve session cookies and tokens on disk, creating a reusable authentication artifact that may be stolen, misused by later agent runs, or accidentally shared.

Content

Scanner excerpt · SKILL.md (reported line 236)May include surrounding context.

bash
agent-browser state save auth.json    # Save session state
agent-browser state load auth.json    # Load saved state

Example: Form submission

Session Persistence

Medium
Category
Rogue Agent
Confidence
95% confidence
Finding

The authentication example normalizes saving login state to auth.json and later reloading it to access an account dashboard, but omits any discussion of the sensitivity of that file. In skill context, this makes the persistence of authenticated access look routine and low-risk, which increases the chance of credential-equivalent artifacts being left behind or reused inappropriately.

Content

Scanner excerpt · SKILL.md (reported line 265)May include surrounding context.

agent-browser wait --url "/dashboard" agent-browser state save auth.json

Later sessions: load saved state

agent-browser state load auth.json agent-browser open https://app.example.com/dashboard

text