Back to skill

Security audit

claw-browser-automation-skill

Security checks for vulnerabilities and agentic risk

Overview

This browser automation skill is not clearly malicious, but it gives agents broad browser control, saved login-session reuse, page script execution, and an unpinned global install that users should review carefully.

Install only if you trust the `agent-browser` npm package and are comfortable giving an agent broad control over a local browser. Treat saved browser state files as secrets, keep them out of repositories, delete them after use, avoid real bearer tokens in transcripts or shell history, and prefer pinned or locally reviewed dependencies over the global latest npm install.

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 (1)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:17
Finding

Unpinned Globally Installed Third-Party Dependency

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 17–20
Vulnerability Type: T08: Insecure Dependencies
Risk Level: Medium

Code Snippet:

bash
### Step 1: Install agent-browser
```bash
npm install -g agent-browser
text

The installation instruction is also repeated at `SKILL.md:633`:

```markdown
- **agent-browser**: `npm install -g agent-browser`

Technical Analysis

The Skill instructs users to install the latest available version of the agent-browser npm package globally without pinning a reviewed version, verifying package integrity, or identifying an authoritative repository. As a result, the code installed and executed can change after the Skill has been audited.

A global npm installation may execute package lifecycle scripts with the privileges of the user running npm. It also places package-provided executables in a global command path. If the package, a transitive dependency, the maintainer account, or the package-distribution channel is compromised, following this instruction could install and execute unauthorized code.

The audit did not establish that the named package is currently malicious. The vulnerability is the unsafe and non-reproducible dependency installation process.

Attack Path

  1. An attacker compromises the npm package, one of its dependencies, or a maintainer publishing account.
  2. The attacker publishes a malicious release or introduces a malicious lifecycle script.
  3. A user follows the Skill instruction and runs npm install -g agent-browser.
  4. npm retrieves the latest release rather than a previously audited version.
  5. Malicious lifecycle code can execute during installation, or a malicious globally installed CLI can execute when later invoked.
  6. The payload operates with the installing user's privileges and can access resources available to that account.

Impact Assessment

Successful exploitation could result in arbitrary c ...[truncated 637 chars]

Remediation
View remediation

Remediation Suggestions

  • Pin the dependency to a specific, reviewed version rather than installing the latest release:
    bash
    npm install --save-exact agent-browser@<reviewed-version>
    
  • Prefer a project-local installation with a committed lockfile over a global installation.
  • Document the package's authoritative npm scope and official source repository so users can detect similarly named or spoofed packages.
  • Verify package provenance and integrity before installation, including published checksums or npm provenance attestations where available.
  • Audit both the direct package and its transitive dependencies before approving version updates.
  • Consider disabling lifecycle scripts during installation when compatible:
    bash
    npm install --ignore-scripts --save-exact agent-browser@<reviewed-version>
    
  • Apply dependency updates through a controlled review process rather than resolving an unrestricted version at installation time.
  • Avoid running npm with sudo, an administrator account, or other elevated privileges.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (7)

Session Persistence

Medium
Category
Rogue Agent
Confidence
90% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

macOS:

bash
export AGENT_BROWSER_EXECUTABLE_PATH="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
# Add to ~/.zshrc for persistence
echo 'export AGENT_BROWSER_EXECUTABLE_PATH="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"' >> ~/.zshrc

Session Persistence

Medium
Category
Rogue Agent
Confidence
94% confidence
Finding

The documented save/load state capability enables persistence of browser session material, likely including cookies and authenticated context. In the skill context, this is more dangerous because the skill explicitly promotes reusing saved auth state, which can normalize insecure storage and increase the chance of credential replay or session hijacking.

Content

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

md
# Save/Load state
agent-browser state save auth.json          # Save session state
agent-browser state load auth.json          # Load saved state
agent-browser state clear                   # Clear all saved states

# Parallel sessions

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The authentication state persistence workflow encourages saving browser state to auth-state.json without prominently warning that such files may contain session cookies or other sensitive authentication artifacts. If stored insecurely, reused broadly, or committed to source control, that state can enable account/session takeover.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The API testing recipe uses browser-side fetch with an Authorization header, extending the skill from browser automation into arbitrary authenticated API access. That gives the skill a path to directly transmit credentials and retrieve sensitive backend data outside normal UI workflows, increasing misuse potential in agent-driven contexts.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The example includes an Authorization bearer token in a request pattern without an accompanying warning about secret handling, logging, or accidental disclosure. In practice, users may copy this pattern with real tokens, exposing credentials in shell history, skill transcripts, screenshots, or repository files.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
#!/bin/bash
# api-test.sh

agent-browser open https://api.example.com/docs
agent-browser snapshot -i

# Execute JavaScript in browser context

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill documents agent-browser eval for executing arbitrary JavaScript in the browser context, which materially expands the capability from browser interaction into code execution against whatever page is loaded. In an agent skill, this can enable extraction of sensitive DOM data, manipulation of application state, and execution of unintended actions on authenticated sites beyond the declared automation scope.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.