Back to skill

Security audit

file-transfer-thru-local-workspace

Security checks for vulnerabilities and agentic risk

Overview

The skill is a disclosed local file-transfer server, but it creates a persistent network-facing upload/download service with fail-open authentication and risky credential handling.

Review this before installing on any shared, routed, or production machine. It should be fixed to bind to localhost by default, fail closed when authentication is missing, use a dedicated service token instead of gateway credentials, avoid URL query-string secrets, enforce upload size limits, and make persistent startup an explicit opt-in.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • 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 (5)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
src/upload-server.js:24
Finding

Password-only configurations leave all file-management APIs unauthenticated

Content
View full analysis
/dev/null | head -1 | cut -d'"' -f4) # Try to read password if no token is available GATEWAY_PASSWORD=$(grep -o '"password": *"[^"]*"' "${CONFIG_FILE}" 2>/dev/null | head -1 | cut -d'"' -f4) # Check authentication mode AUTH_MODE=$(grep -o '"mode": *"[^"]*"' "${CONFIG_FILE}" 2>/dev/null | head -1 | cut -d'"' -f4) if [ -n "${GATEWAY_TOKEN}" ]; then echo "✅ Authentication mode: Token" echo "✅ Gateway Token found" AUTH_VALUE="${GATEWAY_TOKEN}" elif [ -n "${GATEWAY_PASSWORD}" ]; then echo "✅ Authentication mode: Password" echo "✅ Gateway Password found" AUTH_VALUE="${GATEWAY_PASSWORD}" ``` `install.sh:79`: ```sh Environment=GATEWAY_AUTH_VALUE=${AUTH_VALUE} ``` `src/upload-server.js:24-36`: ```js function loadGatewayToken() { try { const configPath = path.join(process.env.HOME || '/home/admin', '.openclaw/openclaw.json'); const config = JSON.parse(fs.readFileSync(configPath, 'utf8')); return config.gateway?.auth?.token || ''; } catch (e) { return ''; } } const GATEWAY_TOKEN = loadGatewayToken(); ``` Representative authorization check in `src/upload-server.js:333-335`: ```js const tokenParam = parsedUrl.searchParams.get('token'); if (GATEWAY_TOKEN && tokenParam !== GATEWAY_TOKEN) { ``` `src/upload-server.js:493`: ```js server.listen(PORT, '0.0.0.0', () => { ``` ### Technical Analysis The installer claims to support both Gateway tokens and passwords. It stores either value in the `GATEWAY_AUTH_VALUE` ...[truncated 1907 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
src/upload.html:298
Finding

Gateway credentials are exposed in plaintext URLs and the systemd unit

Content
View full analysis

Loading...

`; try { let url = '/api/skills'; if (token) { url += '?token=' + encodeURIComponent(token); } ``` `src/upload.html:640-652`: ```js let url = '/api/upload'; if (token) { url += '?token=' + encodeURIComponent(token); } const response = await fetch(url, { method: 'POST', body: formData }); ``` `install.sh:68-80`: ```sh if [ -d "/etc/systemd/system" ]; then echo "🔧 Creating systemd service..." cat > /etc/systemd/system/openclaw-upload.service << EOF [Unit] Description=OpenClaw File Upload Service After=network.target [Service] Type=simple User=${USER} WorkingDirectory=${WORKSPACE} Environment=UPLOAD_PORT=15170 Environment=WORKSPACE=${WORKSPACE} Environment=GATEWAY_AUTH_VALUE=${AUTH_VALUE} ``` The documented access pattern in `SKILL.md:61` is: ```text http://:15170/?token= ``` ### Technical Analysis The browser obtains the Gateway credential from the page URL and appends it to every API URL. Query-string credentials can be retained in browser history, copied in shared links, recorded by access logs or monitoring systems, and exposed in screenshots or diagnostics. The documentation instructs users to access the service over unencrypted HTTP. Any network ob ...[truncated 1733 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
src/upload-server.js:357
Finding

Unbounded request buffering enables remote memory-exhaustion denial of service

Content
View full analysis
chunks.push(chunk)); req.on('end', () => { try { const buffer = Buffer.concat(chunks); ``` The metadata declares a limit in `clawhub.json:46`: ```json "maxFileSize": "50MB" ``` No corresponding enforcement exists in the upload handler. ### Technical Analysis Every incoming multipart request chunk is retained in an array until the client finishes sending the body. The complete request is then copied into another buffer by `Buffer.concat`. No `Content-Length` validation, streaming byte counter, request timeout, concurrency limit, or maximum file-size check is present. An attacker does not need to send a valid file. A large or slowly delivered multipart request consumes memory before multipart parsing occurs. Multiple concurrent requests amplify consumption. The systemd unit uses `Restart=always`, allowing repeated crashes to create a sustained denial-of-service condition. The advertised 50 MB value is configuration metadata only and does not protect the runtime. ### Attack Path 1. The attacker reaches TCP port 15170. 2. If authentication is enabled, the attacker uses a compromised credential; if authentication is disabled or bypassed, no credential is needed. 3. The attacker opens one or more `POST /api/upload` requests with multipart content. 4. Each request continuously sends a very large body or leaves the body incomplete while sending data slowly. 5. The server stores every chunk in memory without enforcing a limit. 6. Memory use grows until the Node.js process is terminated, crashes, or causes host-level resource pressure. 7. Under systemd, the process restarts and the attacker re ...[truncated 387 chars]
Remediation
View remediation

T06 · System Persistence

Warning
Location
install.sh:68
Finding

Installer creates a system-wide persistent service without explicit opt-in and may fail to remove it

Content
View full analysis
/etc/systemd/system/openclaw-upload.service << EOF [Unit] Description=OpenClaw File Upload Service After=network.target [Service] Type=simple User=${USER} WorkingDirectory=${WORKSPACE} Environment=UPLOAD_PORT=15170 Environment=WORKSPACE=${WORKSPACE} Environment=GATEWAY_AUTH_VALUE=${AUTH_VALUE} ExecStart=/usr/bin/node ${WORKSPACE}/upload-server.js Restart=always RestartSec=5 [Install] WantedBy=multi-user.target EOF systemctl daemon-reload systemctl enable openclaw-upload.service systemctl start openclaw-upload.service ``` `uninstall.sh:12-23`: ```sh # Stop service if systemctl is-active --quiet openclaw-upload.service 2>/dev/null; then echo "⏹️ Stopping systemd service..." systemctl stop openclaw-upload.service systemctl disable openclaw-upload.service rm -f /etc/systemd/system/openclaw-upload.service systemctl daemon-reload echo "✅ systemd service removed" else echo "⏹️ Stopping background process..." pkill -f "node upload-server.js" || true echo "✅ Background process stopped" fi ``` ### Technical Analysis Installation writes directly into `/etc/systemd/system`, enables the service for future boots, starts it immediately, and configures unconditional restart. These are system-level persistence operations requiring privileges beyond the metadata’s declared `node`, network-listen, and workspace-write permissions. Automatic startup is related to the declared convenience functionality, but using a system-wide unit without explicit consent exceeds minimum privilege. A user-level unit or on-demand launch would provide the same core file-transfer capability with less authority. ...[truncated 1428 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
src/upload-server.js:325
Finding

Unauthenticated responses disclose absolute internal filesystem paths

Content
View full analysis
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
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (27)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node src/upload-server.js

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · uninstall.sh (reported line 17)May include surrounding context.

sh
echo "⏹️  停止 systemd 服务..."
    systemctl stop openclaw-upload.service
    systemctl disable openclaw-upload.service
    rm -f /etc/systemd/system/openclaw-upload.service
    systemctl daemon-reload
    echo "✅ systemd 服务已卸载"
else

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · uninstall.sh (reported line 28)May include surrounding context.

sh
# 删除文件
echo "🗑️  删除文件..."
rm -f "${WORKSPACE}/upload-server.js"
rm -f "${WORKSPACE}/upload.html"
rm -f "${WORKSPACE}/upload-server.log"

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · uninstall.sh (reported line 29)May include surrounding context.

sh
# 删除文件
echo "🗑️  删除文件..."
rm -f "${WORKSPACE}/upload-server.js"
rm -f "${WORKSPACE}/upload.html"
rm -f "${WORKSPACE}/upload-server.log"

echo ""

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · uninstall.sh (reported line 30)May include surrounding context.

sh
echo "🗑️  删除文件..."
rm -f "${WORKSPACE}/upload-server.js"
rm -f "${WORKSPACE}/upload.html"
rm -f "${WORKSPACE}/upload-server.log"

echo ""
echo "╔═══════════════════════════════════════════════════════╗"

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documentation explicitly instructs the AI to tell users how to retrieve gateway authentication secrets from ~/.openclaw/openclaw.json, including token or password locations. Even though it says not to reveal the secret directly, guiding users or an agent to access credential files normalizes secret retrieval and can lead to accidental disclosure, prompt-induced secret exfiltration, or unsafe operational practices.

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 · SKILL.md (reported line 309)May include surrounding context.

  1. 检查防火墙:
bash
sudo iptables -L -n | grep 15170

上传失败

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Content

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

  1. 检查文件权限:
bash
ls -la ~/.openclaw/workspace/uploads/
  1. 检查认证配置:

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The installer reads gateway credentials from the user's OpenClaw config and reuses them as authentication for an unrelated upload service. This repurposes sensitive credentials across trust boundaries, increasing the chance of credential exposure via process listings, service definitions, logs, URLs, or weaker handling in the upload service, and could let anyone with the gateway secret access the file-upload endpoint.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The installer not only reads gateway credentials but propagates them into service startup as environment data without clearly disclosing the exposure risk. In the systemd path, the secret is written into /etc/systemd/system/openclaw-upload.service; in the fallback path it is placed on the nohup command line, both of which can expose credentials to local users, administrators, backups, or diagnostic tooling.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script creates and immediately starts a persistent HTTP upload service bound to the host network, making a new file-ingest endpoint reachable at port 15170. Exposing a file upload service expands attack surface substantially, especially because installers typically run with elevated privileges and users may not realize they have opened a network-accessible service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The installer opens a network-accessible upload page and starts it persistently without a prominent safety warning that a local file-upload endpoint is being exposed. Because the script prints an HTTP URL using the host IP and even tolerates empty authentication, users may unknowingly deploy an insecure service on trusted or shared networks.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
86% confidence
Finding

Enabling the service with systemd establishes persistence so the upload server restarts automatically across reboots. Persistence is risky here because it keeps a network-facing file-upload endpoint continuously available, increasing the window for compromise and making accidental exposure long-lived.

Content

Scanner excerpt · install.sh (reported line 89)May include surrounding context.

sh
EOF
    
    systemctl daemon-reload
    systemctl enable openclaw-upload.service
    systemctl start openclaw-upload.service
    
    echo "✅ systemd 服务已创建并启动"

Session Persistence

Medium
Category
Rogue Agent
Confidence
78% confidence
Finding

Launching the server under nohup in the background creates semi-persistent execution outside the user's immediate session, leaving the upload endpoint running after installation completes. Although weaker than systemd persistence, it still creates an unattended long-lived service that may be forgotten and remain exposed.

Content

Scanner excerpt · install.sh (reported line 97)May include surrounding context.

sh
# 直接启动服务
    echo "🚀 启动上传服务..."
    cd "${WORKSPACE}"
    nohup env UPLOAD_PORT=15170 WORKSPACE="${WORKSPACE}" GATEWAY_AUTH_VALUE="${AUTH_VALUE}" \
        node upload-server.js > upload-server.log 2>&1 &
    echo "✅ 上传服务已启动(后台运行)"
fi

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

This code presents the server description and operational messaging entirely in Chinese, and no nearby comments or logic indicate that users can opt into another language. Under the stated policy, forcing a specific language without user choice is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The server reads a gateway authentication token directly from a local user config file and then uses that secret to gate file and skill download operations. This couples the service to a highly privileged local credential and increases blast radius if the process, logs, or surrounding environment are compromised; it also encourages reuse of a broad gateway token for a narrow file server purpose.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The server exposes an API that enumerates skill directories and packages arbitrary skills into ZIP files for download. In this context, skills likely contain source code, prompts, configuration, and possibly embedded secrets; serving entire directories materially increases the risk of intellectual property leakage and accidental disclosure of sensitive files, even though the code uses spawn arguments and basename to reduce command injection and traversal.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This HTML page provides a file upload capability to the OpenClaw user directory and later sends selected files to /api/upload, but the UI text only says to upload files and does not disclose that the files will be transmitted to the server or stored remotely. For a code/HTML file handling user data transfer, the absence of any warning or explanatory notice around the upload action makes the data movement insufficiently disclosed.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This page exposes skill-package enumeration and download functionality in addition to ordinary user file management, and it forwards a bearer-like token via query string to those endpoints. If access control on the backend is weak or the token leaks through URLs, logs, or referrals, an attacker could list and download installed skill packages, which may contain sensitive prompts, logic, credentials, or proprietary code. In the context of an agent skill, exposing downloadable skill packages increases the attack surface beyond the stated upload purpose and is more dangerous because skills themselves may influence agent behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The feature list explicitly highlights Chinese filename support using locale-specific language, but the document does not indicate whether other languages/locales are equally supported or whether this is optional. Under the language/locale policy rule, emphasizing a specific language without user opt-in can be a policy concern unless clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

This manifest describes capabilities and purpose, but it does not define any narrow activation context, explicit trigger phrases, or exclusion conditions. For a manifest file, that makes invocation scope ambiguous and increases the risk that a host system could surface or invoke the skill too broadly.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The manifest includes a dedicated Chinese-language description variant, but there is no accompanying natural-language indication that locale selection is optional or user-driven. Under the stated policy, locale-specific behavior should be presented as a choice or clearly justified, rather than implied as a default constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script's comments and all user-facing status/error messages are presented in Chinese, with no opt-in or alternative locale. This can violate language/locale policy expectations when a skill is distributed to general users without an explicit region-specific justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The natural-language description is entirely in Chinese, with no indication that the skill is region-specific or that users may choose another language. This can violate language/locale policy expectations when a skill implicitly forces a specific language without opt-in.

Content

No source excerpt is available for this finding.

Unverifiable Dependency: openclaw has 16 known advisory(ies) (CVE-2026-53846 (OpenClaw: Workspace .env npm_execpath could influence bundled runtime dependency); CVE-2026-32064 (OpenClaw's andbox browser noVNC observer lacked VNC authentication); CVE-2026-32006 (OpenClaw has a BlueBubbles group allowlist mismatch via DM pairing-store fallbac) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

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
src/upload-server.js:202