Back to skill

Security audit

Clawhub

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed browser-automation tool, but it grants long-running authenticated browser control and local browser-data access without enough containment.

Install only if you are comfortable giving a local helper broad control over your logged-in Chromium browser. Before use, understand that it can read page contents, act in authenticated sessions, inspect Chrome/Edge history and bookmarks when directed, attach local files to upload controls, and keep a localhost proxy running after a task ends. Prefer using it in a separate browser profile with limited accounts and stop the proxy when not needed.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/cdp-proxy.mjs:253
Finding

Unauthenticated Persistent CDP Browser-Control API

Content
View full analysis

Vulnerability Details

File Location: scripts/cdp-proxy.mjs:253-260, 330-601, 653-658; persistent startup occurs at scripts/check-deps.mjs:90-105
Vulnerability Type: Missing authentication and caller validation on a privileged local API
Risk Level: High

Complete Code Snippets

The HTTP server processes requests without authenticating the caller:

js
const server = http.createServer(async (req, res) => {
  const parsed = new URL(req.url, `http://localhost:${PORT}`);
  const pathname = parsed.pathname;
  const q = Object.fromEntries(parsed.searchParams);
  if (q.target) touchTab(q.target);

  res.setHeader('Content-Type', 'application/json; charset=utf-8');

Arbitrary caller-supplied JavaScript is evaluated in the selected browser target:

js
else if (pathname === '/eval') {
  let sid;
  let contextId;
  if (q.frame !== undefined) ({ sessionId: sid, contextId } = await pageFrames.frameContext(q.target, q.frame));
  else sid = await ensureSession(q.target);
  const body = await readBody(req);
  const expr = body || q.expr || 'document.title';
  const resp = await sendCDP('Runtime.evaluate', {
    expression: expr,
    returnByValue: true,
    awaitPromise: true,
    ...(contextId ? { contextId } : {}),
  }, sid);

The same unauthenticated API can place caller-selected local files into a web page's file input:

js
else if (pathname === '/setFiles') {
  const sid = await ensureSession(q.target);
  const body = JSON.parse(await readBody(req));
  if (!body.selector || !body.files) {
    res.statusCode = 400;
    res.end(JSON.stringify({ error: '需要 selector 和 files 字段' }));
    return;
  }

  await sendCDP('DOM.enable', {}, sid);
  const doc = await sendCDP('DOM.getDocument', {}, sid);
  const node = await sendCDP('DOM.querySelector', {
    nodeId: doc.result.root.nodeId,
    selector: body.selector
  }, sid);

  await sendCDP('DOM.setFi
...[truncated 4636 chars]
Remediation
View remediation

Remediation Suggestions

  1. Generate a cryptographically random capability token whenever the proxy starts and require it on every privileged endpoint. Pass it in an authorization header rather than a URL query parameter.
  2. Validate the Host header against an exact allowlist and reject unknown hostnames to mitigate DNS-rebinding attacks.
  3. Reject requests with unexpected Origin values on every privileged endpoint, not only /shutdown. Do not treat a missing Origin as the sole proof of authorization.
  4. Prefer access-controlled local IPC, such as a Unix-domain socket with restrictive filesystem permissions, where platform support permits it.
  5. Restrict normal operations to tabs created and tracked by the proxy. Require separate explicit authorization before listing, attaching to, manipulating, or closing pre-existing user tabs.
  6. Disable /setFiles by default or require an explicit per-operation approval containing an allowlisted path. Canonicalize paths and constrain them to user-approved files or directories.
  7. Constrain screenshot output to an application-owned directory and create files safely rather than accepting arbitrary output paths.
  8. Rotate credentials on every proxy restart and avoid persisting bearer tokens in logs or command lines.
  9. Consider terminating the proxy after a bounded idle period or requiring an explicit user action to reactivate privileged browser control.
  10. Add security tests proving that unauthenticated requests, forged Host headers, and browser-originated cross-origin requests cannot invoke privileged endpoints.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (52)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
**首次配置**:按 `exit 2` 的输出逐步做,步骤以脚本输出为准。要点:脚本只列出应用数据根目录的最外层文件夹名;由你从名字认出浏览器,再用 `browser-probe.mjs` 探测(它只接受根目录下的相对路径);无论找到几个都要问用户,再把选定的数据目录写入配置。已有健康的共享服务时,前置检查优先复用它,

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

Searching the user's local history and bookmarks for 'internal systems' or previously visited pages exposes sensitive personal and organizational information through simple natural-language prompts. Because the capability is built into the normal workflow, an agent could retrieve confidential internal URLs or browsing traces unrelated to the user's current need.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The /screenshot endpoint accepts a caller-controlled file path and writes screenshot bytes directly to disk with fs.writeFileSync. Even though the server binds to 127.0.0.1, any local process or local-origin abuse path that can reach the API can overwrite arbitrary user-accessible files, turning a web automation helper into a local file-write primitive.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script explicitly reads local Chrome/Edge bookmarks and history to locate targets that public search would not reveal, including internal systems, SSO backends, and intranet domains. That is unrelated to normal web-access automation and creates a clear local data-harvesting capability that can expose sensitive organizational infrastructure and user behavior.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The comments state that bookmark/history collection is intended to identify non-public targets such as internal systems, SSO administration surfaces, and intranet hostnames. This is strong evidence of reconnaissance-oriented design, making the capability especially dangerous in a broadly scoped web-access skill because it can expose internal attack surface and confidential environment details.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill exposes powerful capabilities including shell execution, network access, and use of environment-dependent local resources, but the manifest does not declare any explicit tool scope or permission boundaries. This weakens reviewability and increases the chance an agent will use sensitive capabilities such as local file access, browser-session reuse, and HTTP control surfaces more broadly than users expect.

Content

No source excerpt is available for this finding.

Ssd 4

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill explicitly advertises handling login-required sites and anti-scraping bypasses, and its workflow normalizes browser-session reuse and stealthy automation. In context, this increases the risk of unauthorized access to protected content and actions performed through the user's authenticated browser state under the guise of routine web access.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The operational instructions and required user-facing notice are written entirely in Chinese, including the mandated message to show the user before proceeding. This imposes a specific language without any opt-in or documented locale justification.

Content

No source excerpt is available for this finding.

Ssd 4

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The workflow encourages escalating from search/fetch to direct CDP browser control when ordinary methods fail, including for anti-scraping-restricted platforms. This creates a structured path toward bypassing access controls and interacting with content in ways that may exceed authorization or violate user expectations.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill instructs agents to search local browser bookmarks and history, including for prior pages and internal systems, which goes beyond ordinary web retrieval and accesses sensitive local user data. Because the behavior is triggered from broad natural-language cues, it can expose private browsing activity, internal URLs, and organizational resources without clear necessity or consent gating.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

Reading local browser history and bookmarks without an explicit privacy warning is dangerous because these data sources routinely contain personal interests, account-related URLs, and internal corporate links. The skill frames this as a normal retrieval step, which lowers friction for accessing sensitive local data and can lead to over-collection.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 142)May include surrounding context.

Proxy API

所有操作通过 curl 调用 HTTP API:

bash
# 列出用户已打开的 tab

Ssd 4

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The login guidance is designed to leverage the user's existing authenticated browser sessions first and only later request user action, reducing friction for access to protected content. In this skill's context, that behavior makes authenticated data exposure or unintended account actions more likely because the agent operates inside the user's daily browser environment.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill directs agents to persist site-specific experience files under the user's home directory, creating long-lived local state outside the stated web-access purpose. Persistent cross-task storage can accumulate browsing patterns, internal site knowledge, and task-derived artifacts that later agents may reuse in ways the user did not anticipate.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill instructs agents to write persistent site-pattern files under the user's home directory without clearly warning that task-derived data will be stored locally. Even if intended as operational cache, these files can encode internal URLs, anti-bot behavior, login requirements, and other sensitive patterns that persist across sessions.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · references/cdp-api.md (reported line 46)May include surrounding context.

GET /targets

列出所有已打开的页面 tab。返回数组,每项含 targetId、title、url。

bash
curl -s http://localhost:3456/targets

POST /new

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · references/cdp-api.md (reported line 111)May include surrounding context.

范围:不含 shadow root 里的 iframe,也不递归嵌套。嵌套在跨进程 iframe 里的 iframe,以外层 iframe 的 frameId 作 target 再调用一次(/frames?target=FRAME_ID、/eval?target=FRAME_ID&frame=INNER_ID)。

bash
curl -s "http://localhost:3456/frames?target=ID"

GET /clickXY?target=ID&x=120&y=90

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The documented /setFiles capability bypasses the browser's native file picker and directly injects local file paths into upload controls. In a web-access skill that automates login-required and complex sites, this creates meaningful risk of silent exfiltration of sensitive local files if higher-level callers are not forced to obtain explicit user consent and path validation.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · references/migration-2.5.3.md (reported line 6)May include surrounding context.

TL;DR

diff
- curl -s "http://localhost:3456/new?url=https://example.com"
+ curl -s -X POST --data-raw 'https://example.com' http://localhost:3456/new

- curl -s "http://localhost:3456/navigate?target=ID&url=https://example.com"

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · references/migration-2.5.3.md (reported line 39)May include surrounding context.

md
| 场景 | 旧(v2.5.2) | 新(v2.5.3) |
|---|---|---|
| 简单 URL | `curl ".../new?url=https://example.com"` | `curl -X POST --data-raw 'https://example.com' .../new` |
| URL 含 query | `curl ".../new?url=https://xhs.com/explore/x?xsec_token=ABC"` ⚠️ token 丢失 | `curl -X POST --data-raw 'https://xhs.com/explore/x?xsec_token=ABC' .../new` ✓ |
| URL 含 `#` fragment | `curl ".../new?url=https://app/page#sec"` ⚠️ fragment 丢失 | `curl -X POST --data-raw 'https://app/page#sec' .../new` ✓ |

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · references/migration-2.5.3.md (reported line 40)May include surrounding context.

md
| 场景 | 旧(v2.5.2) | 新(v2.5.3) |
|---|---|---|
| 简单 URL | `curl ".../new?url=https://example.com"` | `curl -X POST --data-raw 'https://example.com' .../new` |
| URL 含 query | `curl ".../new?url=https://xhs.com/explore/x?xsec_token=ABC"` ⚠️ token 丢失 | `curl -X POST --data-raw 'https://xhs.com/explore/x?xsec_token=ABC' .../new` ✓ |
| URL 含 `#` fragment | `curl ".../new?url=https://app/page#sec"` ⚠️ fragment 丢失 | `curl -X POST --data-raw 'https://app/page#sec' .../new` ✓ |

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · references/migration-2.5.3.md (reported line 41)May include surrounding context.

md
| 场景 | 旧(v2.5.2) | 新(v2.5.3) |
|---|---|---|
| 简单 URL | `curl ".../new?url=https://example.com"` | `curl -X POST --data-raw 'https://example.com' .../new` |
| URL 含 query | `curl ".../new?url=https://xhs.com/explore/x?xsec_token=ABC"` ⚠️ token 丢失 | `curl -X POST --data-raw 'https://xhs.com/explore/x?xsec_token=ABC' .../new` ✓ |
| URL 含 `#` fragment | `curl ".../new?url=https://app/page#sec"` ⚠️ fragment 丢失 | `curl -X POST --data-raw 'https://app/page#sec' .../new` ✓ |

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · references/migration-2.5.3.md (reported line 47)May include surrounding context.

md
| 场景 | 旧(v2.5.2) | 新(v2.5.3) |
|---|---|---|
| 简单 URL | `curl ".../new?url=https://example.com"` | `curl -X POST --data-raw 'https://example.com' .../new` |
| URL 含 query | `curl ".../new?url=https://xhs.com/explore/x?xsec_token=ABC"` ⚠️ token 丢失 | `curl -X POST --data-raw 'https://xhs.com/explore/x?xsec_token=ABC' .../new` ✓ |
| URL 含 `#` fragment | `curl ".../new?url=https://app/page#sec"` ⚠️ fragment 丢失 | `curl -X POST --data-raw 'https://app/page#sec' .../new` ✓ |

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · scripts/cdp-proxy.mjs (reported line 342)May include surrounding context.

js
| 场景 | 旧(v2.5.2) | 新(v2.5.3) |
|---|---|---|
| 简单 URL | `curl ".../new?url=https://example.com"` | `curl -X POST --data-raw 'https://example.com' .../new` |
| URL 含 query | `curl ".../new?url=https://xhs.com/explore/x?xsec_token=ABC"` ⚠️ token 丢失 | `curl -X POST --data-raw 'https://xhs.com/explore/x?xsec_token=ABC' .../new` ✓ |
| URL 含 `#` fragment | `curl ".../new?url=https://app/page#sec"` ⚠️ fragment 丢失 | `curl -X POST --data-raw 'https://app/page#sec' .../new` ✓ |

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · scripts/cdp-proxy.mjs (reported line 381)May include surrounding context.

js
| 场景 | 旧(v2.5.2) | 新(v2.5.3) |
|---|---|---|
| 简单 URL | `curl ".../new?url=https://example.com"` | `curl -X POST --data-raw 'https://example.com' .../new` |
| URL 含 query | `curl ".../new?url=https://xhs.com/explore/x?xsec_token=ABC"` ⚠️ token 丢失 | `curl -X POST --data-raw 'https://xhs.com/explore/x?xsec_token=ABC' .../new` ✓ |
| URL 含 `#` fragment | `curl ".../new?url=https://app/page#sec"` ⚠️ fragment 丢失 | `curl -X POST --data-raw 'https://app/page#sec' .../new` ✓ |