Back to skill

Security audit

Agent Browser Ref

Security checks for vulnerabilities and agentic risk

Overview

This browser automation skill is coherent, but it needs review because it encourages saving website login state and uses an unpinned global install without enough safety guidance.

Install only if you trust the `agent-browser` package source and are comfortable with a global browser automation tool. Treat saved browser state, cookies, and localStorage as secrets: keep them outside projects, restrict file permissions, avoid committing or sharing them, and delete them when no longer needed. Use separate low-privilege browser sessions for sensitive sites.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (2)

T08 · Insecure Dependencies

Warning
Location
references/SKILL.md:197
Finding

Unpinned Global Third-Party Package Installation

Content
View full analysis

Vulnerability Details

File Location: references/SKILL.md, lines 197-201
Vulnerability Type: Unpinned dependency installation and supply-chain exposure
Risk Level: Medium

Vulnerable Code:

bash
## Installation

```bash
npm install -g agent-browser
agent-browser install                     # Download Chromium
agent-browser install --with-deps         # Linux: + system deps

Technical Analysis

The documentation instructs users to install agent-browser globally without specifying an exact package version or integrity value. The reviewed skill therefore does not determine which package implementation will be installed. A later release, compromised publisher account, registry compromise, or malicious dependency update could introduce code that was not present during this audit.

npm installation can execute package lifecycle scripts with the installing user's privileges. The subsequent agent-browser install command downloads additional browser components, while agent-browser install --with-deps may install or modify operating-system dependencies. These operations increase the trusted supply-chain surface beyond the static files included in this project.

This finding does not establish that the current agent-browser package is malicious. The vulnerability is the unsafe, unpinned installation procedure and the resulting inability to reproduce the reviewed dependency set.

Attack Path

  1. An attacker compromises the package publisher, package registry, upstream release process, or a transitive dependency.
  2. The attacker publishes a modified version under the expected package name.
  3. A user follows the skill instructions and runs npm install -g agent-browser.
  4. npm retrieves the currently published version rather than a version reviewed and pinned by the project.
  5. Malicious lifecycle code or installed CLI code executes with the privileges of the installing user.
  6. If the use ...[truncated 866 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin agent-browser to an exact, audited version rather than installing the latest available release.
  2. Verify and document the expected package publisher, upstream repository, release signature, and package integrity hash.
  3. Prefer a project-local dependency managed through a committed lockfile over a global installation.
  4. Disable or separately review npm lifecycle scripts where operationally possible.
  5. Run installation as an unprivileged user in an isolated environment or container.
  6. Document every system modification performed by install --with-deps, and avoid that option unless the dependency list and installation script have been reviewed.
  7. Pin and verify downloaded Chromium artifacts and transitive dependencies where the tool supports doing so.
  8. Periodically re-audit the pinned package before upgrading it.

T09 · Insecure Skill Coding Practices

Warning
Location
references/SKILL.md:100
Finding

Browser Authentication State Saved Without Protection Guidance

Content
View full analysis

Vulnerability Details

File Location: references/SKILL.md, lines 100-101
Vulnerability Type: Plaintext storage of sensitive browser authentication state
Risk Level: Medium

Vulnerable Code:

bash
agent-browser state save auth.json        # Save cookies/storage
agent-browser state load auth.json        # Load (skip login)

The practice is also encouraged at line 163:

text
4. **Save auth state** - Skip login flows with `state save/load`

Technical Analysis

Browser state files can contain session cookies, bearer tokens, local-storage credentials, and other reusable authentication material. The skill recommends saving this state to a predictable auth.json file and later loading it to bypass login, but it provides no instructions for encryption, owner-only file permissions, secure placement, source-control exclusion, retention limits, or deletion.

Because the saved state is explicitly intended to restore an authenticated session, possession of the file may be sufficient to impersonate the corresponding user until the stored session expires or is revoked. A predictable filename in the working directory also increases the chance that the file will be copied into backups, attached to support bundles, exposed through artifacts, or accidentally committed to a repository.

No credential file is included in the audited project, and no direct exfiltration behavior was found. The issue is the insecure handling guidance for authentication material generated when users follow the documented workflow.

Attack Path

  1. A user authenticates to a website through agent-browser.
  2. The user runs agent-browser state save auth.json as recommended.
  3. Session cookies or tokens are written to the predictable state file.
  4. The file remains accessible through permissive filesystem permissions, a shared workspace, backups, build artifacts, or an accidental source-control commit.
  5. An unauthorize ...[truncated 1030 chars]
Remediation
View remediation

Remediation Suggestions

  1. Avoid persisting authenticated browser state unless it is operationally necessary.
  2. Store state files in a dedicated secrets directory outside the project and outside shared or synchronized folders.
  3. Create files with owner-only permissions, such as mode 0600, and ensure the containing directory is accessible only to the intended user.
  4. Encrypt state files at rest using an operating-system credential store or managed secrets service.
  5. Use unique, non-predictable temporary paths when persistence is unnecessary.
  6. Add browser-state filename patterns to source-control, artifact, backup, and logging exclusion rules.
  7. Define short retention periods and securely delete state files immediately after use.
  8. Use separate least-privileged accounts and isolated browser sessions for administrative and ordinary workflows.
  9. Revoke affected sessions immediately if a state file may have been exposed.
  10. Add an explicit warning that saved state must be treated with the same sensitivity as passwords or API tokens.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (4)

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
88% confidence
Finding

The skill content discloses an internal absolute filesystem path and specific skill naming convention, which enables environment and asset enumeration. While not directly exploitable on its own, this information can help an attacker map the workspace layout, infer installed skills, and craft more targeted follow-on attacks against local tooling or adjacent files.

Content

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

md
# agent-browser-ref

Ingested on 2026-07-23T00:55:34Z from /root/.openclaw/workspace/skills/agent-browser-clawdbot/SKILL.md.

- source file: `SKILL.md`
- size: 5548 bytes

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · assets/metadata.json (reported line 3)May include surrounding context.

json
{
  "name": "agent-browser-ref",
  "source_path": "/root/.openclaw/workspace/skills/agent-browser-clawdbot/SKILL.md",
  "filename": "SKILL.md",
  "size_bytes": 5548,
  "sha256": "9643b9c65476eedd5ab353956c31a4d4ce9ad225f9a786d23376a43893f59979",

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill explicitly recommends saving and loading browser auth state but does not warn that the resulting files can contain live session cookies, tokens, and other persistent authentication material. In an agent setting, this omission can lead users or downstream agents to store secrets insecurely, reuse them across contexts, or accidentally expose them through logs, artifacts, or shared workspaces.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill documents commands for reading and modifying cookies and localStorage without any guidance on sensitive-data handling. Because these stores commonly contain session identifiers, CSRF tokens, PII, and application secrets, exposing them in a skill can encourage unsafe inspection, logging, or tampering practices by agents and users.

Content

No source excerpt is available for this finding.