Back to skill

Security audit

OpenClaw Command Center

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent OpenClaw monitoring dashboard, but its default and proxy authentication behavior can expose sensitive dashboard data and job controls more broadly than the documentation implies.

Install only if you are comfortable running a local dashboard over your OpenClaw workspace data. Before use, bind it explicitly to loopback or a trusted interface, enable token-based authentication for any non-local access, and avoid relying on the Tailscale/Cloudflare/header-based modes unless the origin is unreachable except through a correctly configured trusted proxy.

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

T05 · Unauthorized Access and Privilege Escalation

Error
Location
lib/server.js:5088
Finding

Default unauthenticated server binding exposes sensitive APIs and job controls to remote clients

Content
View full analysis

Vulnerability Details

File Location: lib/server.js:214, lib/server.js:5088-5103, lib/server.js:5118-5147, lib/server.js:5427-5433; source counterparts src/config.js:196-228, src/index.js:288-312, src/index.js:324-354, src/index.js:670-675
Vulnerability Type: Missing authentication combined with unrestricted network binding
Risk Level: High

Complete Code Snippets

The effective bundled entry point defaults authentication to none:

js
server: {
  port: parseInt(process.env.PORT || fileConfig.server?.port || "3333", 10),
  host: process.env.HOST || fileConfig.server?.host || "localhost"
},
// ...
auth: {
  mode: process.env.DASHBOARD_AUTH_MODE || fileConfig.auth?.mode || "none",

The request handler only performs authentication when the mode is not none:

js
var server = http.createServer(async (req, res) => {
  res.setHeader("Access-Control-Allow-Origin", "*");
  const urlParts = req.url.split("?");
  const pathname = urlParts[0];
  const query = new URLSearchParams(urlParts[1] || "");
  if (pathname === "/api/health") {
    res.writeHead(200, { "Content-Type": "application/json" });
    res.end(JSON.stringify({
      status: "ok",
      port: PORT,
      timestamp: (/* @__PURE__ */ new Date()).toISOString()
    }));
    return;
  }
  const isPublicPath = AUTH_CONFIG.publicPaths.some(
    (p) => pathname === p || pathname.startsWith(p + "/")
  );
  if (!isPublicPath && AUTH_CONFIG.mode !== "none") {
    const authResult = checkAuth(req, AUTH_CONFIG);
    if (!authResult.authorized) {
      console.log(`[AUTH] Denied: ${authResult.reason} (path: ${pathname})`);
      res.writeHead(403, { "Content-Type": "text/html" });
      res.end(getUnauthorizedPage(authResult.reason, authResult.user, AUTH_CONFIG));
      return;
    }
    req.authUser = authResult.user;
  }

Sensitive routes are then reachable, including session details:

js
if (pathname === "/api/status") {
  handleApi(req, res);
} else if (pathname === 
...[truncated 3419 chars]
Remediation
View remediation

Remediation Suggestions

  1. Enforce the configured host when starting the server:
js
server.listen(PORT, CONFIG.server.host, () => {
  // ...
});
  1. Preserve localhost or an explicit loopback address as the default binding.
  2. Refuse startup when authentication is none and the selected bind address is not loopback.
  3. Require authentication for all endpoints containing session, memory, cron, system, project, or job information.
  4. Apply separate authorization checks to job mutation endpoints, rather than treating dashboard access as sufficient authorization.
  5. Restrict mutation endpoints to the expected HTTP methods and consider CSRF protections when browser-based authentication is used.
  6. Remove the wildcard CORS policy or replace it with an explicit allowlist appropriate to the deployment.
  7. Add integration tests that verify:
    • Default startup accepts only loopback connections.
    • Non-loopback binding fails unless a secure authentication mode is configured.
    • Every sensitive and state-changing endpoint rejects unauthenticated requests.

T05 · Unauthorized Access and Privilege Escalation

Error
Location
src/auth.js:17
Finding

Proxy authentication modes trust attacker-supplied identity and forwarding headers

Content
View full analysis

Vulnerability Details

File Location: lib/server.js:885-954; source counterpart src/auth.js:17-89
Vulnerability Type: Authentication bypass through untrusted proxy headers
Risk Level: High

Complete Code Snippet

js
function checkAuth(req, authConfig) {
  const mode = authConfig.mode;
  const remoteAddr = req.socket?.remoteAddress || "";
  const isLocalhost =
    remoteAddr === "127.0.0.1" ||
    remoteAddr === "::1" ||
    remoteAddr === "::ffff:127.0.0.1";

  if (isLocalhost) {
    return {
      authorized: true,
      user: { type: "localhost", login: "localhost" }
    };
  }

  if (mode === "none") {
    return { authorized: true, user: null };
  }

  if (mode === "token") {
    const authHeader = req.headers["authorization"] || "";
    const token = authHeader.replace(/^Bearer\s+/i, "");
    if (token && token === authConfig.token) {
      return { authorized: true, user: { type: "token" } };
    }
    return { authorized: false, reason: "Invalid or missing token" };
  }

  if (mode === "tailscale") {
    const login =
      (req.headers[AUTH_HEADERS.tailscale.login] || "").toLowerCase();
    const name = req.headers[AUTH_HEADERS.tailscale.name] || "";
    const pic = req.headers[AUTH_HEADERS.tailscale.pic] || "";

    if (!login) {
      return {
        authorized: false,
        reason: "Not accessed via Tailscale Serve"
      };
    }

    const isAllowed = authConfig.allowedUsers.some((allowed) => {
      if (allowed === "*") return true;
      if (allowed === login) return true;
      if (allowed.startsWith("*@")) {
        const domain = allowed.slice(2);
        return login.endsWith("@" + domain);
      }
      return false;
    });

    if (isAllowed) {
      return {
        authorized: true,
        user: { type: "tailscale", login, name, pic }
      };
    }

    return {
      authorized: false,
      reason: `User ${login} not in allowlist`,
      user: { login }
    };
  }

  if (mode === "cloudflare") {
    const e
...[truncated 4355 chars]
Remediation
View remediation

Remediation Suggestions

  1. Do not treat identity headers as trustworthy unless the socket peer is a configured trusted proxy.
  2. For Cloudflare deployments:
    • Prevent direct public access to the origin.
    • Restrict ingress to documented Cloudflare proxy ranges or a private tunnel.
    • Validate Cloudflare Access JWT assertions, including issuer, audience, signature, and expiration.
  3. For Tailscale deployments:
    • Bind the dashboard to the interface used exclusively by Tailscale Serve or to loopback behind it.
    • Verify that the immediate peer is the expected local or Tailscale proxy.
    • Reject direct requests carrying Tailscale identity headers.
  4. For IP allowlists:
    • Use req.socket.remoteAddress by default.
    • Honor X-Forwarded-For only when the immediate peer belongs to an explicitly configured trusted-proxy allowlist.
    • Parse the forwarding chain according to the deployment's trusted-hop count.
  5. Ensure the trusted proxy removes inbound client-supplied identity headers and writes authoritative values itself.
  6. Reconsider unconditional localhost authorization. If retained, require an explicit configuration option and document that every local reverse proxy must enforce authentication.
  7. Add negative tests proving that forged identity and forwarding headers from untrusted peer addresses are rejected.
Vulnerability Patterns
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • 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
Findings (137)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Reading and writing privacy configuration files and persisting state to disk without clear permission declaration creates risk of unintended configuration changes and hidden local data storage. In a dashboard context, this can affect what data is visible or hidden without transparent auditing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Reading and writing privacy configuration files and persisting state to disk without clear permission declaration creates risk of unintended configuration changes and hidden local data storage. In a dashboard context, this can affect what data is visible or hidden without transparent auditing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Reading and writing privacy configuration files and persisting state to disk without clear permission declaration creates risk of unintended configuration changes and hidden local data storage. In a dashboard context, this can affect what data is visible or hidden without transparent auditing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Reading and writing privacy configuration files and persisting state to disk without clear permission declaration creates risk of unintended configuration changes and hidden local data storage. In a dashboard context, this can affect what data is visible or hidden without transparent auditing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
88% confidence
Finding

Reading and writing privacy configuration files and persisting state to disk without clear permission declaration creates risk of unintended configuration changes and hidden local data storage. In a dashboard context, this can affect what data is visible or hidden without transparent auditing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

Reading and writing privacy configuration files and persisting state to disk without clear permission declaration creates risk of unintended configuration changes and hidden local data storage. In a dashboard context, this can affect what data is visible or hidden without transparent auditing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Reading and writing privacy configuration files and persisting state to disk without clear permission declaration creates risk of unintended configuration changes and hidden local data storage. In a dashboard context, this can affect what data is visible or hidden without transparent auditing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Reading and writing privacy configuration files and persisting state to disk without clear permission declaration creates risk of unintended configuration changes and hidden local data storage. In a dashboard context, this can affect what data is visible or hidden without transparent auditing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Reading and writing privacy configuration files and persisting state to disk without clear permission declaration creates risk of unintended configuration changes and hidden local data storage. In a dashboard context, this can affect what data is visible or hidden without transparent auditing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Reading and writing privacy configuration files and persisting state to disk without clear permission declaration creates risk of unintended configuration changes and hidden local data storage. In a dashboard context, this can affect what data is visible or hidden without transparent auditing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Reading and writing privacy configuration files and persisting state to disk without clear permission declaration creates risk of unintended configuration changes and hidden local data storage. In a dashboard context, this can affect what data is visible or hidden without transparent auditing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Reading and writing privacy configuration files and persisting state to disk without clear permission declaration creates risk of unintended configuration changes and hidden local data storage. In a dashboard context, this can affect what data is visible or hidden without transparent auditing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Reading and writing privacy configuration files and persisting state to disk without clear permission declaration creates risk of unintended configuration changes and hidden local data storage. In a dashboard context, this can affect what data is visible or hidden without transparent auditing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Reading and writing privacy configuration files and persisting state to disk without clear permission declaration creates risk of unintended configuration changes and hidden local data storage. In a dashboard context, this can affect what data is visible or hidden without transparent auditing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

Reading and writing privacy configuration files and persisting state to disk without clear permission declaration creates risk of unintended configuration changes and hidden local data storage. In a dashboard context, this can affect what data is visible or hidden without transparent auditing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Reading and writing privacy configuration files and persisting state to disk without clear permission declaration creates risk of unintended configuration changes and hidden local data storage. In a dashboard context, this can affect what data is visible or hidden without transparent auditing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

Reading and writing privacy configuration files and persisting state to disk without clear permission declaration creates risk of unintended configuration changes and hidden local data storage. In a dashboard context, this can affect what data is visible or hidden without transparent auditing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Reading and writing privacy configuration files and persisting state to disk without clear permission declaration creates risk of unintended configuration changes and hidden local data storage. In a dashboard context, this can affect what data is visible or hidden without transparent auditing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

Reading and writing privacy configuration files and persisting state to disk without clear permission declaration creates risk of unintended configuration changes and hidden local data storage. In a dashboard context, this can affect what data is visible or hidden without transparent auditing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Reading and writing privacy configuration files and persisting state to disk without clear permission declaration creates risk of unintended configuration changes and hidden local data storage. In a dashboard context, this can affect what data is visible or hidden without transparent auditing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Reading and writing privacy configuration files and persisting state to disk without clear permission declaration creates risk of unintended configuration changes and hidden local data storage. In a dashboard context, this can affect what data is visible or hidden without transparent auditing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Reading and writing privacy configuration files and persisting state to disk without clear permission declaration creates risk of unintended configuration changes and hidden local data storage. In a dashboard context, this can affect what data is visible or hidden without transparent auditing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Reading and writing privacy configuration files and persisting state to disk without clear permission declaration creates risk of unintended configuration changes and hidden local data storage. In a dashboard context, this can affect what data is visible or hidden without transparent auditing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Reading and writing privacy configuration files and persisting state to disk without clear permission declaration creates risk of unintended configuration changes and hidden local data storage. In a dashboard context, this can affect what data is visible or hidden without transparent auditing.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Reading and writing privacy configuration files and persisting state to disk without clear permission declaration creates risk of unintended configuration changes and hidden local data storage. In a dashboard context, this can affect what data is visible or hidden without transparent auditing.

Content

No source excerpt is available for this finding.