Back to skill

Security audit

Openclaw Newbie Faq

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a legitimate Chinese OpenClaw help guide, but it can start an unmanaged background web server that may be reachable beyond the user's own browser.

Install only if you are comfortable with a local guide service starting on port 34567. Prefer a pinned or trusted ClawHub installer, avoid following the sudo npm advice unless you understand the risk, and be prepared to manually find and stop the node server if it keeps running after deactivation. The publisher should bind the server to 127.0.0.1, remove nohup/background startup, narrow the triggers, and document shutdown behavior clearly.

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

T09 · Insecure Skill Coding Practices

Warning
Location
server.js:64
Finding
Web Service Listens on All Network Interfaces Despite Localhost-Only Documentation<![CDATA[ ## Vulnerability Details **File Location**: `server.js:64-66` **Vulnerability Type**: Unnecessarily exposed network service **Risk Level**: Medium ### Vulnerable Code ```javascript server.listen(PORT, () => { log('info', `Web 服务已启动`, { port: PORT, url: `http://localhost:${PORT}` }); }); ``` ### Technical Analysis No hostname is supplied to `server.listen`. In Node.js, this normally causes the server to listen on the unspecified IPv6 or IPv4 address, exposing it through all available network interfaces rather than only through the loopback interface. This behavior conflicts with the documented access scope of `http://localhost:34567`. The current implementation serves static files and does not contain authenticated or state-changing endpoints, which limits the immediate impact. Nevertheless, hosts on the same network—or remote systems when firewall or port-forwarding rules permit it—can reach the service. ### Attack Path 1. A user activates the Skill, starting the HTTP server on port `34567`. 2. Node.js binds the listener to all available network interfaces. 3. An attacker scans the user's reachable address and discovers port `34567`. 4. The attacker connects directly to the service without authentication. 5. The attacker retrieves the hosted content and can repeatedly send requests to the exposed HTTP listener. ### Impact Assessment An unauthenticated network attacker can access the Skill's web service wherever host and network firewall rules allow connectivity. The exposed content is currently static and does not include identified secrets, so no direct privilege escalation or confidential-data compromise was established. The principal impacts are unintended service exposure, expanded attack surface, content enumeration, and potential resource consumption through repeated requests. ]]>
Remediation
<![CDATA[ ## Remediation Suggestions Bind the service explicitly to the loopback interface: ```javascript server.listen(PORT, '127.0.0.1', () => { log('info', 'Web service started', { port: PORT, url: `http://127.0.0.1:${PORT}` }); }); ``` Additional hardening should include: 1. Validate that the configured port is an integer in the range `1-65535`. 2. Add request timeouts and conservative header limits. 3. Return `405 Method Not Allowed` for methods other than `GET` and `HEAD`. 4. Add security headers, including `Content-Security-Policy`, `X-Content-Type-Options: nosniff`, and `Referrer-Policy`. 5. If non-local access is intentionally required in the future, make it an explicit configuration option and add authentication. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
skill.json:15
Finding
Detached Server Process Is Not Managed by the Skill Lifecycle<![CDATA[ ## Vulnerability Details **File Location**: `skill.json:15-18` **Vulnerability Type**: Unmanaged background process and incomplete shutdown control **Risk Level**: Medium ### Vulnerable Code ```json "entryPoint": { "type": "shell", "command": "cd ~/.openclaw/workspace/skills/openclaw-newbie-faq && nohup node server.js > /tmp/newbie-faq.log 2>&1 &" } ``` ### Technical Analysis The shell entry point uses both `nohup` and the background operator `&`. Consequently, the server is detached from the invoking shell and can continue running after that shell or activation operation ends. The detached process is not assigned to the `serverProcess` variable used by `index.js`. Therefore, the JavaScript `deactivate()` implementation cannot reliably identify or terminate a server started through this shell entry point. Repeated activation can also cause repeated launch attempts or port-binding errors. The command redirects logs to a predictable shared path, `/tmp/newbie-faq.log`. While no direct symlink-based privilege escalation was established because the process normally runs with the invoking user's privileges, the predictable location is an unsafe logging practice on multi-user systems. ### Attack Path 1. The shell entry point is invoked by a trigger or Skill loader. 2. `nohup node server.js ... &` creates a server process independent of the invoking shell. 3. The activation shell exits while the server continues listening. 4. A normal lifecycle deactivation calls the JavaScript shutdown logic, but that logic has no handle for the detached process. 5. The service remains active until manually located and terminated or until the process or system stops. 6. Repeated activation attempts may create additional processes that fail, generate log noise, or compete for the same port. ### Impact Assessment The Skill can leave a network service running beyond its expected lifecycle. The process retains the same operating-system privileges as the user who l ...[truncated 243 chars]
Remediation
<![CDATA[ ## Remediation Suggestions Remove the detached shell entry point and use the managed JavaScript lifecycle implementation exclusively. The server process should remain attached to the Skill host or be tracked by PID until deactivation. Recommended actions: 1. Replace the shell entry point with the JavaScript entry point defined by the package. 2. Do not use `nohup` or `&`. 3. Retain the child-process handle and await termination during deactivation. 4. Add handlers for `SIGINT`, `SIGTERM`, and host shutdown. 5. Prevent duplicate activation by verifying process liveness rather than checking only whether a variable is non-null. 6. If logs must be written to disk, use a user-owned directory created with restrictive permissions instead of a predictable path under `/tmp`. 7. Add an error handler for `EADDRINUSE` and report activation failure rather than returning success immediately. ]]>

T08 · Insecure Dependencies

Warning
Location
README.md:25
Finding
Installation Instructions Execute an Unpinned Package Through npx<![CDATA[ ## Vulnerability Details **File Location**: `README.md:25-29` **Vulnerability Type**: Mutable package execution in installation workflow **Risk Level**: Medium ### Vulnerable Code ```markdown ## 安装 ```bash npx clawhub install openclaw-newbie-faq ``` ``` The same installation pattern is also presented in `SKILL.md` and `介绍.html`. ### Technical Analysis The instructions invoke `clawhub` through `npx` without specifying an exact package version or integrity value. If the corresponding command is not already available locally, `npx` may retrieve and execute package code from the configured npm registry. Because the package version is not pinned, the code executed by future users can differ from the code available when this Skill was audited. This creates a supply-chain trust dependency on the package publisher, registry, DNS/TLS path, and the user's npm registry configuration. The reviewed repository does not itself contain a malicious dependency payload. Exploitation requires compromise, replacement, or malicious resolution of the externally retrieved CLI package. ### Attack Path 1. A user follows the documented installation command. 2. `npx` attempts to resolve the `clawhub` executable. 3. If the package is unavailable locally, `npx` downloads it from the configured registry. 4. A compromised publisher account, registry, dependency chain, or malicious registry configuration supplies altered package code. 5. `npx` executes that package code with the installing user's privileges. 6. The malicious package can access files and resources available to that user before or during Skill installation. ### Impact Assessment A compromised package resolved by `npx` could execute arbitrary code with the invoking user's privileges. This could potentially expose user-readable files, modify user-owned configuration, install additional software, or compromise the OpenClaw workspace. No such malicious behavior was found in the audited project itself; the risk ...[truncated 56 chars]
Remediation
<![CDATA[ ## Remediation Suggestions Use a trusted, preinstalled CLI or pin the installer to a verified exact version. For example: ```bash npx --yes clawhub@<verified-exact-version> install openclaw-newbie-faq ``` Additional safeguards should include: 1. Publish and verify package provenance. 2. Document the expected npm registry and package owner. 3. Avoid version ranges and mutable distribution tags such as `latest`. 4. Provide checksum or signature verification where supported. 5. Keep the same secured installation instructions in `README.md`, `SKILL.md`, and `介绍.html`. 6. Prefer installation through a trusted OpenClaw package-management interface that does not dynamically execute an unverified installer package. ]]>

T08 · Insecure Dependencies

Note
Location
web/index.html:8
Finding
Local Web Interface Loads an Unverified Third-Party Stylesheet<![CDATA[ ## Vulnerability Details **File Location**: `web/index.html:8` **Vulnerability Type**: Unpinned remote browser dependency without Subresource Integrity **Risk Level**: Low ### Vulnerable Code ```html <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> ``` ### Technical Analysis Although the application is presented as a local static interface, the page automatically contacts cdnjs to retrieve Font Awesome. The dependency is not bundled locally and the link does not provide a Subresource Integrity hash. A compromised CDN response or upstream asset could alter the page's presentation through malicious CSS. CSS alone does not provide general JavaScript execution in modern browsers, so arbitrary script execution was not established. However, hostile CSS can obscure content, imitate interface elements, load additional remote resources through CSS URLs, and facilitate deceptive user-interface behavior. The request also discloses network metadata, including the user's IP address, to the external provider. ### Attack Path 1. The user opens the local page at `http://localhost:34567`. 2. The browser requests the stylesheet from cdnjs. 3. A compromised CDN, upstream asset, or network trust boundary returns modified CSS. 4. Because no integrity hash is specified, the browser accepts the modified response. 5. The stylesheet modifies the local page's appearance or initiates further permitted resource requests. ### Impact Assessment The external provider receives connection metadata whenever the interface is loaded. If the stylesheet delivery path is compromised, an attacker can affect the page's visual integrity and potentially facilitate UI deception or additional tracking. No direct access to operating-system privileges, OpenClaw credentials, or arbitrary JavaScript execution was demonstrated from this stylesheet reference alone. ]]>
Remediation
<![CDATA[ ## Remediation Suggestions Bundle Font Awesome and all required font files inside the Skill package and serve them from the existing local static server. If remote hosting must be retained: 1. Add a verified Subresource Integrity hash. 2. Add `crossorigin="anonymous"`. 3. Deploy a restrictive Content Security Policy that permits styles and fonts only from explicitly approved origins. 4. Pin the exact asset version and periodically verify its integrity. 5. Set an appropriate `Referrer-Policy`. 6. Document that opening the local interface makes a request to a third-party service. Example: ```html <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" integrity="<verified-sha384-hash>" crossorigin="anonymous" referrerpolicy="no-referrer"> ``` ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
Findings (25)

Hidden Instructions

High
Category
Prompt Injection
Content
</head>
<body>
    <div class="container">
        <!-- 头部 -->
        <header class="header">
            <div class="logo">
                <i class="fas fa-robot"></i>
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
The README instructs users to run `npx clawhub install openclaw-newbie-faq` without pinning a specific version. This can cause users to fetch and execute whatever package version is current at install time, increasing supply-chain risk if a future release is compromised, replaced, or unexpectedly changed.

Natural-Language Policy Violations

Medium
Confidence
90% confidence
Finding
The usage instruction tells the user to say the exact Chinese phrase “启动新手帮助” to start the service. This imposes a specific language for invocation, and the README does not mention alternative languages, user choice, or a region-specific justification.

Vague Triggers

Medium
Confidence
93% confidence
Finding
The README says users can say '新手帮助' to start the service, but the manifest trigger list on L010 does not include that exact phrase. This creates unclear activation behavior and broadens invocation expectations without a precise, consistent trigger list.

Rp1

Medium
Category
MCP Rug Pull
Confidence
85% confidence
Finding
The documentation instructs users to run `npx clawhub install openclaw-newbie-faq` without pinning a specific version of the package manager/tooling being fetched at execution time. This creates a supply-chain risk because `npx` may download and execute the latest published package, allowing unexpected or malicious code changes upstream to affect installs.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The skill starts a local web service on port 34567, but the installation and usage guidance does not prominently warn users up front that invoking the skill will open a listening local service. Undisclosed service exposure can surprise users, conflict with existing services, and increase local attack surface, especially if the server binds beyond localhost or is implemented unsafely.

Missing User Warnings

Medium
Confidence
86% confidence
Finding
Claiming that the web UI will open automatically in a browser, without a clear upfront warning in the primary usage instructions, reduces transparency around side effects of invoking the skill. Automatically launching a browser and starting a local service are user-environment actions that should be explicitly disclosed before activation so users can make an informed decision.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The display name, description, logs, and activation/deactivation messages are presented in Chinese, and there is no indication that the skill is region-specific or that users can opt into another language. This creates a natural-language locale policy issue because the skill imposes a specific language on all users by default.

Vague Triggers

Medium
Confidence
93% confidence
Finding
The description tells users to say a broad natural-language phrase, '启动新手帮助', to launch the skill. Trigger phrases that resemble ordinary conversation can cause unintended activation, especially in systems that route user utterances to installed skills based on fuzzy matching. Because activation starts a web service on port 34567, accidental invocation has side effects beyond simple content display, increasing the security relevance of the ambiguity.

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
The package description is entirely in Chinese and instructs users with a fixed Chinese trigger phrase, without indicating language options or user choice. In multilingual environments this can mislead users, reduce transparency, and contribute to accidental activations or misunderstanding about what the skill does. While not severe on its own, it is a genuine usability and trust issue with security implications when combined with the service-start behavior.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The manifest states that saying a phrase will start a web service on port 34567, but it does not clearly disclose the security-relevant side effect in a prominent, consent-oriented way. Starting a listener can expose local or network-accessible functionality and create persistence or attack surface, especially for novice users who may not understand what opening a service implies.

Session Persistence

Medium
Category
Rogue Agent
Content
"main": "index.js",
  "entryPoint": {
    "type": "shell",
    "command": "cd ~/.openclaw/workspace/skills/openclaw-newbie-faq && nohup node server.js > /tmp/newbie-faq.log 2>&1 &"
  },
  "triggers": {
    "keywords": ["启动新手帮助", "停止新手帮助", "新手帮助", "我是新手", "我需要帮助", "openclaw 新手", "openclaw 帮助", "openclaw 指南"]
Confidence
97% confidence
Finding
The shell entry point uses `nohup` and backgrounds `node server.js`, creating a detached process that persists beyond the initiating session. This is risky because accidental or repeated activation can leave a long-running service active without lifecycle management, increasing exposure and making it harder for users to notice or stop.

Vague Triggers

Medium
Confidence
96% confidence
Finding
The trigger list includes broad natural-language phrases such as “我是新手” and “我需要帮助”, which are common in ordinary conversation and can cause accidental activation. In this skill, unintended activation is more dangerous because the entry point launches a background Node.js web service, turning a simple misfire into an unintended system-side action.

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
This JavaScript file presents user-facing headings, alerts, FAQ text, and guidance exclusively in Chinese, starting from the top-level comment and continuing throughout the embedded UI strings. Under the policy rule, forcing a specific language without user opt-in is a natural-language locale policy violation unless the locale restriction is explicitly justified, which is not present here.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
</div>
                <ol>
                    <li>推荐:使用 nvm 管理 Node.js</li>
                    <li>或使用 sudo:sudo npm install -g openclaw@latest</li>
                    <li>或修改 npm 全局目录权限</li>
                </ol>
            `
Confidence
91% confidence
Finding
The FAQ content explicitly recommends running 'sudo npm install -g openclaw@latest'. Encouraging elevated npm execution is dangerous because npm lifecycle scripts run with root privileges, which can turn a compromised package, typo-squatted dependency, or tampered registry response into full system compromise.

Session Persistence

Medium
Category
Rogue Agent
Content
<p><strong>开发步骤:</strong></p>
                </div>
                <ol>
                    <li>创建 Skill 目录:mkdir ~/.openclaw/skills/my-skill</li>
                    <li>编写 skill.json 配置文件</li>
                    <li>实现 index.js 主逻辑</li>
                    <li>测试和调试 Skill</li>
Confidence
60% 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.

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
The HTML root sets `lang="zh-CN"`, and the entire user-facing content is presented only in Simplified Chinese. Under the policy, forcing a specific language without user opt-in or a documented justification is a natural-language locale violation.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding
The page instructs users to install the skill via `npx clawhub install openclaw-newbie-faq` without pinning a specific package or skill version. This creates a supply-chain risk: users may receive whatever content is current at install time, including a maliciously updated package, typo-squatted replacement, or compromised upstream artifact.

External Transmission

Medium
Category
Data Exfiltration
Content
<div class="qr-section">
<p class="qr-link">github.com/kunyashaw/openclaw-newbie-faq</p>
<div class="qr-code">
<img src="https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=https://github.com/kunyashaw/openclaw-newbie-faq" alt="QR Code">
</div>
<p class="qr-desc">🧠 大模型常识 + ❓ 常见问题<br>📝 命令大全 + 🏗️ 架构目录 + ⚡ 推荐规范与实践</p>
</div>
Confidence
86% confidence
Finding
The page loads a QR image from `https://api.qrserver.com/`, which causes the user's client to make a request to a third-party service. That leaks metadata such as IP address, user agent, access timing, and the encoded GitHub URL to an external domain; in this informational skill context the exposure is limited, but it is still an external data transmission dependency.

Intent-Code Divergence

Low
Confidence
96% confidence
Finding
Line L160 states that after installation the web UI will automatically open in the browser. However, the documented behavior elsewhere says the user must speak a trigger phrase or manually run the server and then visit http://localhost:34567, which contradicts the auto-open claim.

Context-Inappropriate Capability

Low
Confidence
83% confidence
Finding
No manifest is available, so the skill's intended purpose is unknown. The code nevertheless starts an HTTP server and serves local files from a workspace directory over localhost, which is a meaningful network-facing capability that cannot be justified from any stated purpose or scope.

Natural-Language Policy Violations

Low
Confidence
92% confidence
Finding
This code includes user-visible and maintainer-facing natural-language text in Chinese, including the startup log message on L66 and comments throughout the request handler. The policy for this category flags language/locale constraints when a skill forces a specific language without offering a user choice or documenting a justified locale restriction.

Context-Inappropriate Capability

Low
Confidence
93% confidence
Finding
The page imports Font Awesome from a public CDN, which introduces a supply-chain and privacy dependency into an otherwise local static guide. If the CDN asset is changed, blocked, or observed by a third party, users may receive altered content or leak metadata such as IP address and access timing.

Natural-Language Policy Violations

Low
Confidence
83% confidence
Finding
This CSS file contains natural-language comments in Chinese beginning at L0001, and the selectors throughout appear to support a Chinese-language UI. Under the language/locale policy rule, forcing a specific language without user opt-in can be a policy concern, and this file does not show any indication of multilingual choice or justification.

Natural-Language Policy Violations

Low
Confidence
81% confidence
Finding
The HTML root declares `lang="zh-CN"`, and all visible instructional content is presented only in Simplified Chinese. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy concern unless the locale restriction is documented and justified, which is not present here.

Static analysis

Detected: suspicious.dangerous_exec

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
index.js:28