Back to skill

Security audit

JARVIS UI

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent OpenClaw dashboard, but it exposes powerful local-agent controls with weak network and credential safeguards that users should review before installing.

Install only for trusted local use unless you add your own protection. Do not expose port 9999 directly to a network, avoid enabling allowInsecureAuth for remote access, place any remote deployment behind VPN or authenticated TLS reverse proxy, protect .env and ~/.openclaw/identity files, and treat assistant-rendered content as potentially unsafe until Markdown sanitization and API authentication are fixed.

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

T05 · Unauthorized Access and Privilege Escalation

Error
Location
server/index.js:42
Finding

Unauthenticated Privileged API Exposed on Network Interfaces

Content
View full analysis
{ res.writeHead(200, { 'Content-Type': 'text/event-stream', 'Cache-Control': 'no-cache', Connection: 'keep-alive', 'Access-Control-Allow-Origin': '*', }); res.write('data: {"type":"connected"}\n\n'); addClient(res); req.on('close', () => removeClient(res)); }); app.use('/api', chatRoutes); app.use('/api', statusRoutes(config, OC_CONFIG)); app.use('/api', ttsRoutes); app.use('/api', tasksRoutes); app.use('/api', skillsRoutes); app.use('/api', memoryRoutes); app.use('/api', scheduleRoutes); app.use('/api', voiceRoutes); // server/index.js:83-86 app.listen(PORT, () => { console.log(`[JARVIS] API server on http://localhost:${PORT}`); if (SERVE_STATIC) console.log(`[JARVIS] Serving static files from dist/`); }); ``` Representative privileged endpoints: ```js // server/routes/chat.js:63-101 router.post('/chat', async (req, res) => { const { message } = req.body; if (!message) return res.status(400).json({ error: 'message required' }); bumpMsgCount(); try { const idempotencyKey = `jarvis-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`; const result = await gwRequest('chat.send', { message, sessionKey: req.app.locals.sessionKey, idempotencyKey, deliver: false, }); res.json({ ok: true, ...result }); } catch (err) { res.status(502).json({ error: err.message || 'gateway error' }); } }); router.get('/history', async (req, res) => { try { const result = await gwRequest('chat.history', { sessionKey: req.app.l ...[truncated 3565 chars]
Remediation
View remediation
{ /* ... */ }); ``` 2. Require authenticated sessions or a strong API credential on all `/api/*` routes, including `/api/events`. 3. Apply route-specific authorization. Read-only dashboard access must not automatically grant chat, upload, abort, task mutation, or schedule-control privileges. 4. Add CSRF protection for state-changing requests and validate `Origin` and `Host` against an explicit allowlist. 5. Remove wildcard CORS behavior and allow only the intended dashboard origin. 6. Add rate limits, request timeouts, upload quotas, and explicit JSON body-size limits. 7. For remote access, place the service behind TLS and an authenticated reverse proxy or VPN. Do not expose port 9999 directly. 8. Add automated tests proving that unauthenticated users cannot read private data or invoke mutating operations. ]]>

T05 · Unauthorized Access and Privilege Escalation

Error
Location
server/gateway.js:13
Finding

Gateway Connection Requests Excessive Administrative Scopes and Persists Operator Credentials

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
src/components/markdown.js:20
Finding

Stored and Remote Cross-Site Scripting in Markdown Rendering

Content
View full analysis
$1') .replace(/\*\*\*(.+?)\*\*\*/g, '$1') .replace(/\*\*(.+?)\*\*/g, '$1') .replace(/\*(.+?)\*/g, '$1') .replace(/\[([^\]]+)\]\(([^)]+)\)/g, '$1'); } ``` ```js // src/components/markdown.js:121-140 const headingMatch = line.match(/^(#{1,3})\s+(.+)/); if (headingMatch) { const level = headingMatch[1].length; html.push(`${renderInline(headingMatch[2])}`); continue; } if (line.trim() === '') { continue; } html.push(`

${renderInline(line)}

`); ``` ```js // src/components/chat.js:238-240 if (msg.role === 'assistant') { msgText.innerHTML = renderMarkdown(msg.text); } else { msgText.textContent = msg.text; } ``` ```js // src/components/chat.js:444-450 if (currentReplyLine) { const msgBody = currentReplyLine.querySelector('.msg-body'); if (msgBody) { const timeEl = msgBody.querySelector('.msg-time'); msgBody.innerHTML = renderMarkdown(replyBuffer); if (timeEl) msgBody.appendChild(timeEl); } } ``` ### Technical Analysis Only fenced code blocks are passed through `escapeHtml`. Ordinary paragraphs, headings, list items, table cells, inline code, link labels, and link targets are inserted into generated markup without escaping or sanitization. The generated string is then assigned directly to `innerHTML`. Consequently, HTML supplied in an assistant response or existing Gateway history is interpreted by the browser instead of being displayed as text. Link targets are also not restricted to safe URL sch ...[truncated 1546 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:19
Finding

Remote Deployment Instructions Recommend Disabling Secure Gateway Authentication

Content
View full analysis
> **⚠️ Remote/non-localhost access:** If JARVIS server is accessed from a different machine (not localhost), add this to your `~/.openclaw/openclaw.json`: > ```json > { "gateway": { "controlUi": { "allowInsecureAuth": true } } } > ``` > Then restart OpenClaw Gateway. ``` ```sh # setup.sh:81-83 echo -e "${DIM}⚠️ Remote access? Add to ~/.openclaw/openclaw.json:${NC}" echo -e "${DIM} { \"gateway\": { \"controlUi\": { \"allowInsecureAuth\": true } } }${NC}" ``` ### Technical Analysis The official installation guidance tells remote users to enable a setting explicitly named `allowInsecureAuth`. This weakens the Gateway's authentication posture precisely when the service is being made available beyond localhost. The recommendation is especially dangerous in combination with the backend's lack of API authentication and its unspecified-interface listener. It converts what might otherwise be a local dashboard into a remotely reachable, privileged control surface without introducing TLS, an authenticated reverse proxy, a VPN, or trusted-origin restrictions. ### Attack Path 1. An administrator follows the documented remote-access instructions. 2. The administrator sets `gateway.controlUi.allowInsecureAuth` to `true` and restarts the Gateway. 3. The JARVIS server remains bound without an explicit loopback host and exposes unauthenticated APIs. 4. A network attacker discovers port 9999 or obtains access through routing, port forwarding, or a reverse proxy. 5. The attacker directly reads private endpoints and invokes privileged operations through the dashboard's Gateway connection. ### Impact Assessment The guidance can produce a deployment in which private conversations, telemetry, uploads, task controls, schedule controls, and agent messaging ...[truncated 189 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
setup.sh:33
Finding

Gateway Token Copied to Plaintext Environment File Without Enforced Permissions

Content
View full analysis
/dev/null; then echo "" echo "Detecting Gateway token..." OPENCLAW_CONFIG="${HOME}/.openclaw/openclaw.json" TOKEN="" if [ -f "$OPENCLAW_CONFIG" ]; then TOKEN=$(node -e "try{console.log(JSON.parse(require('fs').readFileSync('$OPENCLAW_CONFIG','utf8')).gateway?.token||'')}catch{}" 2>/dev/null) fi if [ -n "$TOKEN" ]; then echo "GATEWAY_TOKEN=$TOKEN" > .env echo -e "${GREEN}✅ Gateway token auto-detected and saved to .env${NC}" fi fi ``` ### Technical Analysis The setup process reads the Gateway token from OpenClaw's configuration and writes it into a project-local plaintext `.env` file. The write operation relies on the caller's ambient `umask` and does not explicitly enforce mode `0600`. The code also does not validate that `.env` is a regular, non-symlink file before overwriting it. Copying a high-value token into the project directory increases its exposure to local users, backups, support bundles, source-control mistakes, and other tools that recursively process the project. No evidence in the reviewed files establishes that `.env` is excluded from source control. ### Attack Path 1. A user runs `setup.sh`. 2. The script retrieves the Gateway token from `~/.openclaw/openclaw.json`. 3. The token is written to project-local `.env` with permissions determined by the current environment. 4. Another local account, backup process, archive, accidental commit, or project-scanning tool reads the file. 5. The exposed token is used to authenticate to the OpenClaw Gateway, subject to Gateway reachability and token permissions. A symlink placed at `.env` before setup could also redirect the write to another user-writable target, although practical impact depends on filesystem pe ...[truncated 363 chars]
Remediation
View remediation
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
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (114)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The README explicitly instructs users to set allowInsecureAuth: true for remote access, which weakens a security control protecting Gateway authentication over insecure contexts. In a dashboard that exposes live chat, tasks, schedules, skills, memory, and system state, disabling secure auth materially increases the chance of credential interception or unauthorized remote control if the UI is exposed beyond localhost.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
92% confidence
Finding

The README instructs users how to retrieve the Gateway token and place it into .env, normalizing direct handling of a privileged credential without sufficient security warning. In the context of an agent dashboard with control and visibility into chat, tasks, schedules, and memory, compromise of this token could enable unauthorized access to sensitive agent data and operations.

Content

Scanner excerpt · README.md (reported line 122)May include surrounding context.

setup.sh auto-detects your token from ~/.openclaw/openclaw.json. If auto-detection fails, set it manually:

bash
echo "GATEWAY_TOKEN=your_token" > .env

Find your token: run openclaw status or check ~/.openclaw/openclaw.json → gateway.token.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Audio upload and server-side transcription introduce meaningful attack surface including file handling, temporary storage, and command execution around local tooling. If these capabilities are not clearly disclosed, operators may expose a media-processing endpoint without understanding associated risks such as sensitive audio capture or abuse of upload functionality.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Audio upload and server-side transcription introduce meaningful attack surface including file handling, temporary storage, and command execution around local tooling. If these capabilities are not clearly disclosed, operators may expose a media-processing endpoint without understanding associated risks such as sensitive audio capture or abuse of upload functionality.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Audio upload and server-side transcription introduce meaningful attack surface including file handling, temporary storage, and command execution around local tooling. If these capabilities are not clearly disclosed, operators may expose a media-processing endpoint without understanding associated risks such as sensitive audio capture or abuse of upload functionality.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Audio upload and server-side transcription introduce meaningful attack surface including file handling, temporary storage, and command execution around local tooling. If these capabilities are not clearly disclosed, operators may expose a media-processing endpoint without understanding associated risks such as sensitive audio capture or abuse of upload functionality.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Audio upload and server-side transcription introduce meaningful attack surface including file handling, temporary storage, and command execution around local tooling. If these capabilities are not clearly disclosed, operators may expose a media-processing endpoint without understanding associated risks such as sensitive audio capture or abuse of upload functionality.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

Audio upload and server-side transcription introduce meaningful attack surface including file handling, temporary storage, and command execution around local tooling. If these capabilities are not clearly disclosed, operators may expose a media-processing endpoint without understanding associated risks such as sensitive audio capture or abuse of upload functionality.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Audio upload and server-side transcription introduce meaningful attack surface including file handling, temporary storage, and command execution around local tooling. If these capabilities are not clearly disclosed, operators may expose a media-processing endpoint without understanding associated risks such as sensitive audio capture or abuse of upload functionality.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Audio upload and server-side transcription introduce meaningful attack surface including file handling, temporary storage, and command execution around local tooling. If these capabilities are not clearly disclosed, operators may expose a media-processing endpoint without understanding associated risks such as sensitive audio capture or abuse of upload functionality.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Audio upload and server-side transcription introduce meaningful attack surface including file handling, temporary storage, and command execution around local tooling. If these capabilities are not clearly disclosed, operators may expose a media-processing endpoint without understanding associated risks such as sensitive audio capture or abuse of upload functionality.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Audio upload and server-side transcription introduce meaningful attack surface including file handling, temporary storage, and command execution around local tooling. If these capabilities are not clearly disclosed, operators may expose a media-processing endpoint without understanding associated risks such as sensitive audio capture or abuse of upload functionality.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Audio upload and server-side transcription introduce meaningful attack surface including file handling, temporary storage, and command execution around local tooling. If these capabilities are not clearly disclosed, operators may expose a media-processing endpoint without understanding associated risks such as sensitive audio capture or abuse of upload functionality.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Audio upload and server-side transcription introduce meaningful attack surface including file handling, temporary storage, and command execution around local tooling. If these capabilities are not clearly disclosed, operators may expose a media-processing endpoint without understanding associated risks such as sensitive audio capture or abuse of upload functionality.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Audio upload and server-side transcription introduce meaningful attack surface including file handling, temporary storage, and command execution around local tooling. If these capabilities are not clearly disclosed, operators may expose a media-processing endpoint without understanding associated risks such as sensitive audio capture or abuse of upload functionality.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Audio upload and server-side transcription introduce meaningful attack surface including file handling, temporary storage, and command execution around local tooling. If these capabilities are not clearly disclosed, operators may expose a media-processing endpoint without understanding associated risks such as sensitive audio capture or abuse of upload functionality.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Audio upload and server-side transcription introduce meaningful attack surface including file handling, temporary storage, and command execution around local tooling. If these capabilities are not clearly disclosed, operators may expose a media-processing endpoint without understanding associated risks such as sensitive audio capture or abuse of upload functionality.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Audio upload and server-side transcription introduce meaningful attack surface including file handling, temporary storage, and command execution around local tooling. If these capabilities are not clearly disclosed, operators may expose a media-processing endpoint without understanding associated risks such as sensitive audio capture or abuse of upload functionality.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill explicitly instructs users to enable allowInsecureAuth: true for remote access, which weakens authentication protections for a network-exposed control interface. In the context of a UI that may access gateway, local files, tasks, schedules, and memory, this significantly raises the chance of unauthorized remote access and data or control compromise.

Content

No source excerpt is available for this finding.

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · index.html (reported line 10)May include surrounding context.

html
<link rel="author" href="/humans.txt" />
  <title>JARVIS</title>

  <!-- Favicon -->
  <link rel="icon" type="image/png" href="/icons/icon-192.png" />

  <!-- PWA -->

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · index.html (reported line 95)May include surrounding context.

html
</div>
  -->

  <!-- [DISABLED] SYSTEM MONITOR — 已合併至 SYSTEM STATUS
  <div class="data-panel system-monitor" style="position: absolute; top: 20px; right: 20px;">
    <div class="data-panel-title">
      <span>SYSTEM MONITOR</span>

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · index.html (reported line 125)May include surrounding context.

html
</div>
  -->

  <!-- SYSTEM STATUS(合併 System Monitor + Model Status) -->
  <div class="data-panel system-status" style="position: absolute; top: 20px; left: 20px;">
    <div class="data-panel-title">
      <span>SYSTEM STATUS</span>

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · index.html (reported line 125)May include surrounding context.

html
</div>
  -->

  <!-- SYSTEM STATUS(合併 System Monitor + Model Status) -->
  <div class="data-panel system-status" style="position: absolute; top: 20px; left: 20px;">
    <div class="data-panel-title">
      <span>SYSTEM STATUS</span>

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · index.html (reported line 134)May include surrounding context.

html
</div>

    <div class="status-columns">
      <!-- 左側:系統資源 -->
      <div class="status-col status-col-system">
        <div class="waveform">
          <canvas id="cpu-canvas" class="waveform-canvas"></canvas>

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · index.html (reported line 134)May include surrounding context.

html
</div>

    <div class="status-columns">
      <!-- 左側:系統資源 -->
      <div class="status-col status-col-system">
        <div class="waveform">
          <canvas id="cpu-canvas" class="waveform-canvas"></canvas>