Back to skill

Security audit

Personal Agent Browser

Security checks for vulnerabilities and agentic risk

Overview

The skill’s web-browsing purpose is clear, but its URL handling can execute shell commands and its privacy/dependency claims understate real risk.

Review carefully before installing. Do not use this skill with sensitive URLs until the shell execution is replaced with argument-safe process spawning, URL schemes and private/internal destinations are restricted, and the dependency is pinned or locally controlled. Treat web browsing as network activity visible to destination 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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
run_browser.js:26
Finding

Arbitrary Command Execution Through Shell Injection in the URL Argument

Content
View full analysis

Vulnerability Details

File Location: run_browser.js:26-28
Vulnerability Type: OS command injection
Risk Level: High

Vulnerable Code

javascript
const command = `agent-browser --url="${url}" --output=markdown --timeout=10000`;

exec(command, { timeout: 15000 }, (error, stdout, stderr) => {

Technical Analysis

The URL is obtained directly from process.argv[2] and interpolated into a command string passed to child_process.exec. The exec function launches a shell, so shell metacharacters and command substitutions in the URL are interpreted by that shell.

Placing the value inside double quotes does not make it safe. For example, command substitution syntax such as $(command) remains active inside double-quoted shell strings. An attacker can also inject a closing quote followed by shell operators.

There is no URL scheme validation, shell escaping, or argument separation before execution.

Attack Path

  1. An attacker supplies a crafted value where the skill expects a URL.
  2. OpenClaw invokes run_browser.js with that value as its first argument.
  3. The script inserts the value into the command template literal.
  4. exec passes the resulting string to a system shell.
  5. The shell evaluates the injected command substitution or operators before or while invoking agent-browser.
  6. The injected command executes with the identity and environment of the OpenClaw or Node.js process.

A value containing shell substitution, conceptually https://example.invalid/$(attacker-command), is sufficient to reach shell evaluation despite the surrounding double quotes.

Impact Assessment

Successful exploitation provides arbitrary command execution under the operating-system account running the skill. An attacker could read or alter files accessible to that account, access environment variables and local credentials, execute other installed programs, make network requests, or modify the ...[truncated 300 chars]

Remediation
View remediation

Remediation Suggestions

Replace shell-based execution with execFile or spawn, pass every option as a distinct argument, and explicitly disable shell processing:

javascript
const { execFile } = require('child_process');

let parsedUrl;
try {
  parsedUrl = new URL(url);
} catch {
  console.error('Invalid URL');
  process.exit(1);
}

if (!['http:', 'https:'].includes(parsedUrl.protocol)) {
  console.error('Only HTTP and HTTPS URLs are permitted');
  process.exit(1);
}

execFile(
  'agent-browser',
  [
    `--url=${parsedUrl.href}`,
    '--output=markdown',
    '--timeout=10000'
  ],
  {
    timeout: 15000,
    shell: false
  },
  callback
);

In addition:

  • Reject non-HTTP and non-HTTPS schemes.
  • Consider restricting destination hosts if arbitrary browsing is unnecessary.
  • Apply network controls to block loopback, link-local, private-network, and cloud metadata destinations where appropriate.
  • Run the browser process under a minimally privileged account.
  • Do not attempt to solve this solely through manual shell escaping; avoiding a shell is the safer design.

T08 · Insecure Dependencies

Warning
Location
SKILL.md:37
Finding

Unpinned Globally Installed Third-Party Dependency

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:37-40
Additional Locations: SKILL.md:17,35; README.md:7,18-21
Vulnerability Type: Unsafe dependency installation and supply-chain exposure
Risk Level: Medium

Vulnerable Code

markdown
1. **安装依赖**:在你的终端中运行:
   ```bash
   npm install -g agent-browser
   ```

The English README repeats the same installation instruction:

markdown
1. **Install the CLI** (if not done):
   ```bash
   npm install -g agent-browser
   ```

Technical Analysis

The documented command installs the package resolved by npm's mutable default version selection. No exact package version, lockfile, integrity hash, reviewed artifact, or verified source is provided.

npm installation may execute package lifecycle scripts. A global installation can also expose the package's executable across the user's environment. The skill subsequently trusts the executable resolved as agent-browser from PATH.

This does not prove that the current upstream package is malicious. The vulnerability is that installation and runtime behavior depend on an unpinned, externally mutable dependency that is outside the audited project.

Attack Path

  1. A user follows the documented npm install -g agent-browser command.
  2. npm resolves the package version available under its current default distribution tag.
  3. A compromised maintainer account, registry incident, or malicious future release causes an unsafe version to be selected.
  4. Package lifecycle scripts may execute during installation.
  5. The package's globally exposed agent-browser executable is later invoked by run_browser.js.
  6. Malicious package code consequently runs with the installing user's or skill process's permissions.

Impact Assessment

A compromised dependency could execute code during installation or each browsing operation. It could access files and credentials available to the use ...[truncated 329 chars]

Remediation
View remediation

Remediation Suggestions

  • Pin the dependency to a reviewed exact version rather than using npm's mutable latest release.
  • Record dependency resolution and integrity information in a committed lockfile.
  • Install the dependency locally to the project rather than globally, then invoke the known local executable.
  • Disable installation lifecycle scripts when they are not required.
  • Document the canonical package publisher and repository so users can verify package identity.
  • Review new dependency versions before upgrading.
  • Run the tool with minimal filesystem and network privileges.
  • Resolve the executable through a controlled absolute path rather than an uncontrolled PATH.

other

Note
Location
SKILL.md:48
Finding

Misleading Absolute Privacy and Dependency Claims

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:48-52
Additional Locations: SKILL.md:21; README.md:7,12
Vulnerability Type: Misleading security and privacy documentation
Risk Level: Low

Vulnerable Code

markdown
## 安全与隐私
- **完全本地化**:所有操作都在你的本地机器上进行,不向任何服务器发送数据。
- **透明可控**:你完全知道 AI 在做什么——它只是在调用一个你安装的命令行工具。
- **无外部依赖**:不依赖任何云服务、API 密钥或第三方平台。

The README makes corresponding claims:

markdown
This is **your** browser automation skill. It doesn't rely on third-party cloud services or untrusted code. It simply calls the `agent-browser` command-line tool you installed with `npm install -g agent-browser`.
markdown
- **Privacy**: Nothing leaves your machine.

Technical Analysis

The documentation states that no data leaves the machine and that the skill has no external dependency. These absolute claims conflict with the documented and implemented behavior.

The skill exists to request arbitrary web pages through agent-browser. Such browsing necessarily communicates with remote destination servers and may expose the requested URL, source IP address, request headers, cookies, browser characteristics, and other network metadata. The implementation also relies on the separately installed third-party agent-browser npm package.

The issue is not hidden exfiltration in the reviewed script. It is inaccurate assurance that may cause users to make unsafe decisions about sensitive URLs or browsing data.

Attack Path

  1. A user relies on the statements that nothing leaves the machine and that no third-party dependency is involved.
  2. The user asks the skill to retrieve a sensitive, identifying, or secret-bearing URL.
  3. run_browser.js invokes the third-party browser CLI.
  4. The browser contacts the destination and any associated resources.
  5. The destination servers receive request data and network metadata contrary to the user's interpretation of the stated priv ...[truncated 529 chars]
Remediation
View remediation

Remediation Suggestions

Replace absolute claims with an accurate data-flow disclosure. The documentation should clearly state that:

  • Web requests are sent to destination sites and potentially to third-party resource hosts.
  • Destination servers can observe normal request and network metadata.
  • Sensitive tokens, credentials, and personal data should not be placed in URLs.
  • The skill depends on the third-party agent-browser npm package.
  • Privacy guarantees depend on the behavior and configuration of that package.
  • Users should review redirects, cookies, proxy settings, telemetry, and browser persistence settings.

Describe the solution as locally orchestrated rather than claiming that nothing leaves the machine.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (6)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The README encourages users to have the AI automatically fetch and summarize arbitrary web pages, but it does not clearly warn that visited sites will receive requests from the user's machine and may observe IP address, headers, cookies, or authenticated browser state depending on how the CLI works. In a browser-automation skill, this omission can mislead users into treating web access as risk-free, increasing the chance of unintended data exposure or interaction with sensitive/internal URLs.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The skill is described as able to access arbitrary URLs based on broad user prompts, without documented scope limits, exclusions, or confirmation requirements. That increases the chance the agent will be used to fetch attacker-controlled, internal, or sensitive endpoints, expanding SSRF-like and privacy exposure risk in an agent context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The security section claims the skill is 'fully local' and 'safe and reliable' but omits that browsing arbitrary URLs necessarily sends network requests to remote sites, which can expose IP address, user agent, timing, and other browser-identifiable metadata. This can mislead users into unsafe trust assumptions and cause unintended disclosure when the tool is pointed at attacker-controlled pages.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The natural-language description, usage guidance, and examples are presented entirely in Chinese, with no indication that the skill is intended only for a Chinese-speaking audience or that users can opt for another language. This can violate language/locale policy when a skill imposes a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code includes natural-language documentation and CLI output entirely in Chinese, such as the file header and usage/error messages. The policy allows locale constraints only when the skill offers language choice or clearly justifies a region-specific limitation, which is not present here.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The file header says it '获取网页内容并返回结构化摘要', implying the script itself produces a meaningful summary of the page. In reality, lines L60-L65 emit raw title/content and a constant message ('此页面内容已提取,可用于后续分析。') rather than an actual summary derived from page contents.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.dangerous_exec

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
run_browser.js:28