Back to skill

Security audit

Openclaw Skill Browser Use

Security checks for vulnerabilities and agentic risk

Overview

The skill provides the browser automation it advertises, but its installer and autonomous wrapper have serious under-disclosed credential, privilege, and local code-execution risks.

Review before installing. Use only in an isolated, unprivileged environment, avoid running the installer as root unless you have audited the dependency steps, do not rely on stored root OpenClaw provider keys, pass narrowly scoped API keys explicitly, and avoid saving cookies, auth state, screenshots, PDFs, or recordings from sensitive accounts unless you can protect and delete them.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (4)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/browser-use-agent.sh:7
Finding

Arbitrary Python Code Execution Through Unsafely Generated Source Code

Content
View full analysis
/tmp/_bu_task.py << PYEOF import asyncio, os $LLM_IMPORT from browser_use import Agent async def run(): llm = $LLM_INIT agent = Agent(task="""$TASK""", llm=llm) result = await agent.run(max_steps=$MAX_STEPS) final = result.final_result() if final: print(final.extracted_content if hasattr(final, 'extracted_content') else str(final)) else: for r in result.all_results: if r.extracted_content: print(r.extracted_content) asyncio.run(run()) PYEOF xvfb-run "$VENV_DIR/bin/python3" /tmp/_bu_task.py ``` ### Technical Analysis The wrapper constructs a Python program by directly interpolating three caller-controlled values: - `TASK` is inserted inside a triple-quoted Python string. - `MODEL` is inserted inside a single-quoted Python string. - `MAX_STEPS` is inserted as an unrestricted Python expression. None of these values are escaped or validated for the context in which they are inserted. A crafted task can terminate the tripl ...[truncated 1851 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/browser-use-agent.sh:20
Finding

Silent Retrieval of Provider API Keys from a Root-Owned Configuration

Content
View full analysis
/dev/null || true) fi if [ -z "${ANTHROPIC_API_KEY:-}" ] && [ -f "/root/.openclaw/openclaw.json" ]; then export ANTHROPIC_API_KEY=$(python3 -c "import json; print(json.load(open('/root/.openclaw/openclaw.json'))['models']['providers']['anthropic']['apiKey'])" 2>/dev/null || true) fi ``` ### Technical Analysis When a provider key is not explicitly supplied, the wrapper probes the fixed privileged path `/root/.openclaw/openclaw.json` and extracts OpenAI and Anthropic API keys. It then exports the retrieved secret into the environment of the generated Python process. Browser automation legitimately requires a provider credential when an external LLM is used. However, automatically searching a root-owned configuration is not necessary for that functionality. The minimum-privilege design is to require an explicitly supplied, narrowly scoped credential or retrieve one through an approved secret manager. The behavior is also insufficiently disclosed by the README, which instructs users to set an API key explicitly. Exporting the key broadens its exposure to the Python process, dependencies, subprocesses, and any code executed through the source-injection vulnerability. Provider libraries are expected to send the key to the selected OpenAI or Anthropic service as an authentication credential. The security concern is the undeclared privileged discovery and broad propagation of the secret, not provider authentication itself. ### Attack Path 1 ...[truncated 1230 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/browser-use-agent.sh:42
Finding

Predictable Shared Temporary File Enables Symlink, Race, and Code-Substitution Attacks

Content
View full analysis
/tmp/_bu_task.py << PYEOF import asyncio, os $LLM_IMPORT from browser_use import Agent async def run(): llm = $LLM_INIT agent = Agent(task="""$TASK""", llm=llm) result = await agent.run(max_steps=$MAX_STEPS) final = result.final_result() if final: print(final.extracted_content if hasattr(final, 'extracted_content') else str(final)) else: for r in result.all_results: if r.extracted_content: print(r.extracted_content) asyncio.run(run()) PYEOF xvfb-run "$VENV_DIR/bin/python3" /tmp/_bu_task.py ``` The installed wrapper uses the same fixed path: ```bash echo "$SCRIPT" > /tmp/_bu_task.py xvfb-run "$VENV_DIR/bin/python3" /tmp/_bu_task.py ``` ### Technical Analysis Every invocation writes executable Python to the same predictable path, `/tmp/_bu_task.py`. Shared temporary directories are generally writable by local users. The wrapper does not: - Create the file atomically. - Reject symbolic links. - Assign restrictive permissions explicitly. - Verify file ownership or type. - Prevent concurrent invocations. - Remove the generated file after execution. An attacker may pre-create the path as a symbolic link, potentially causing the wrapper to overwrite another file writable by the caller. There is also a race between writing the file and opening it for execution: a local attacker may replace or modify it before the Python interpreter reads it. Concurrent legitimate executions can overwrite one another's tasks, causing one invocation to execute another invocation's generated program. The residual file also discloses the submitted task and selected configuration to users who can read it unde ...[truncated 1373 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
scripts/install.sh:10
Finding

Unpinned Third-Party Packages Are Installed into Privileged and Global Locations

Content
View full analysis
/dev/null; then sudo apt-get update -qq sudo apt-get install -y -qq python3 python3-venv xvfb \ libglib2.0-0 libnss3 libnspr4 libdbus-1-3 libatk1.0-0 \ libatk-bridge2.0-0 libcups2 libdrm2 libxkbcommon0 libxcomposite1 \ libxdamage1 libxrandr2 libgbm1 libpango-1.0-0 libcairo2 libasound2 \ libatspi2.0-0 2>/dev/null || true elif command -v brew &>/dev/null; then echo " macOS detected — Chromium ships with Playwright, skipping system deps" else echo " WARNING: Unknown package manager. Ensure python3, chromium deps are installed." fi if command -v agent-browser &>/dev/null; then echo " agent-browser already installed: $(agent-browser --version 2>/dev/null || echo 'unknown')" else npm install -g agent-browser echo " Installed agent-browser" fi agent-browser install --with-deps 2>/dev/null || agent-browser install 2>/dev/null || { npx playwright install chromium 2>/dev/null || true } if [ ! -d "$VENV_DIR" ]; then python3 -m venv "$VENV_DIR" fi "$VENV_DIR/bin/pip" install -q --upgrade pip "$VENV_DIR/bin/pip" install -q browser-use langchain-anthropic langchain-openai "$VENV_DIR/bin/python3" -m playwright install chromium 2>/dev/null || true ``` ### Technical Analysis The installer resolves and installs mutable current versions of several third-party components without a lockfile, exact versions, package hashes, or integrity verification: - Global npm package `agent-browser`. - The package selected by the `npx playwright` fallback. - Python packages `browser-use`, `langchain-anthropic`, and `langchain-openai`. - An upgraded current version of `pip`. - Browser binaries downloaded by Playwright. The npm package is installed globally, the Python e ...[truncated 1659 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
Findings (20)

Lp1

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'env' capability that is not listed in its permissions. This may indicate deceptive intent or missing permission declarations.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'shell' capability that is not listed in its permissions. This may indicate deceptive intent or missing permission declarations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The README tells users to export API keys directly for autonomous browser operation but provides no warning that these credentials are sensitive or should be scoped and protected. Because this skill drives browser automation and may run in shared shells, logs, CI jobs, or agent environments, exposed API keys could be stolen and abused for account access or billing fraud.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The README advertises persistence of cookies and authentication state without warning that these files may contain bearer tokens, session cookies, or other reusable credentials. In a browser automation skill, users may persist highly privileged sessions to third-party sites, so mishandling or sharing this state can enable account takeover or unauthorized access.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill advertises autonomous interaction with authenticated web apps, form filling, and complex multi-step flows without warning that an agent may submit forms, modify account state, or act within privileged user sessions. That omission is risky because users may invoke the skill in sensitive environments without realizing it can take consequential authenticated actions.

Content

No source excerpt is available for this finding.

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 43)May include surrounding context.

md
# Interact using refs
agent-browser click @e3            # Click element
agent-browser fill @e2 "text"      # Fill input (clears first)
agent-browser press Enter          # Press key

# Extract data

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The screenshot, PDF, and recording features can capture visible secrets, personal data, internal documents, and authenticated application content, yet the skill provides no caution about handling or retaining these artifacts. In practice, users or downstream agents may store or share these files assuming they are harmless, leading to unintentional data disclosure.

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 supports saving/restoring browser state, inspecting cookies, and reading or setting localStorage, but it does not warn users that these artifacts can contain active session tokens, authentication cookies, and other secrets. In an agentic context, this omission increases the chance that sensitive session data will be persisted, exposed in outputs, or reused beyond the user's intent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The guide instructs users to save and reload browser session state, including cookies and authentication material, to a file in /tmp without warning that this can expose live authenticated sessions to other local users, logs, backups, or later unintended reuse. In a browser automation skill, persisted auth state can directly enable account takeover within the automated sites if the file is copied or mishandled.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The autonomous browser agent section describes an agent that decides what to do on pages but does not warn that it may navigate, click, submit forms, or otherwise act on the user's behalf across external websites. In this skill context, that omission is meaningful because the tool is specifically designed for autonomous multi-step browser interaction, which increases the chance of unintended transactions, data disclosure, or policy violations if operators assume it is passive.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The wrapper silently reads API credentials from a fixed root-scoped config file and injects them into the environment, even though browser task execution does not inherently require reading arbitrary local secrets from disk. In an autonomous browser skill, this increases risk because an operator may invoke the tool expecting browser automation, while the script also harvests credentials from a privileged local file path without explicit consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Reading OpenAI and Anthropic API keys from a root-owned configuration file and exporting them without notice is unsafe secret handling. In this skill's context, the browser agent is autonomous and may interact with untrusted web content, so silently broadening secret availability to child processes heightens the chance of accidental exposure through logs, subprocesses, debugging, or future code changes.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · scripts/install.sh (reported line 15)May include surrounding context.

sh
# --- System dependencies ---
echo "[1/5] Installing system dependencies..."
if command -v apt-get &>/dev/null; then
    sudo apt-get update -qq
    sudo apt-get install -y -qq python3 python3-venv xvfb \
        libglib2.0-0 libnss3 libnspr4 libdbus-1-3 libatk1.0-0 \
        libatk-bridge2.0-0 libcups2 libdrm2 libxkbcommon0 libxcomposite1 \

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · scripts/install.sh (reported line 16)May include surrounding context.

sh
# --- System dependencies ---
echo "[1/5] Installing system dependencies..."
if command -v apt-get &>/dev/null; then
    sudo apt-get update -qq
    sudo apt-get install -y -qq python3 python3-venv xvfb \
        libglib2.0-0 libnss3 libnspr4 libdbus-1-3 libatk1.0-0 \
        libatk-bridge2.0-0 libcups2 libdrm2 libxkbcommon0 libxcomposite1 \

Rp1

Medium
Category
MCP Rug Pull
Confidence
84% confidence
Finding

Using npx playwright install chromium without pinning a version makes execution depend on whatever package version the registry resolves at install time. In an installer that may run with elevated privileges and fetch remote code, this increases supply-chain risk and reduces reproducibility.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The wrapper silently reads API keys from /root/.openclaw/openclaw.json and exports them into the process environment. That is an unjustified credential-access behavior for a browser automation skill and expands the blast radius: any browser task or dependent library running under this wrapper can use those secrets without explicit user consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Reading root-scoped provider credentials without warning is a covert secret-handling behavior. In this skill context, the danger is heightened because the wrapper launches an autonomous LLM/browser agent, so the imported credentials could be used for unintended external requests or abused by downstream code.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The entire guide is written in French and directly instructs the agent in that language, with no indication that users may choose another language or that French is required for a region-specific purpose. This can violate language/locale policy when a skill imposes a specific language without opt-in.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script generates Python code in /tmp using untrusted inputs like TASK and MODEL, then executes it. This is dangerous because /tmp is a shared location and, more critically, interpolating shell-controlled values directly into Python source can enable code injection if the task text or model string contains characters that break out of the intended string literal.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The wrapper writes a generated Python script containing the user task and model configuration to a predictable /tmp/_bu_task.py path. Temporary files in shared locations can expose sensitive task contents, be overwritten, or be raced/symlinked by another local user depending on execution context.

Content

No source excerpt is available for this finding.