CRITICALExtracts and decrypts browser cookies containing session keys
scripts/debug-claude-usage.ts:76
[AGENTS: Egress]data_exfiltration
The script reads Chrome and Firefox browser cookies to extract Claude.ai sessionKey values. It decrypts encrypted cookie values using keychain passwords, effectively extracting authentication tokens from the user's browser. This is a severe data exfiltration vulnerability as it accesses and decrypts sensitive browser-stored authentication data.
Suggested Fix
Remove the browser cookie extraction functionality. If session key access is required, use a secure API or require manual input rather than extracting from browser storage.
CRITICALCommand injection in exec tool call
src/agents/pi-embedded-runner/run.ts:143
[AGENTS: Syringe]db_injection
The code constructs shell commands by string concatenation with user-controlled nonce values in the exec tool probe. This is a classic command injection vulnerability where attackers could inject shell metacharacters.
Suggested Fix
Use parameterized exec calls with separate arguments array instead of string concatenation, or properly escape all user input for shell execution.
CRITICALCommand injection in exec tool test
src/gateway/gateway-models.profiles.live.test.ts:130
[AGENTS: Syringe]db_injection
The test constructs shell commands with printf and file redirection using user-controlled nonce values. This is a command injection vulnerability where attackers could inject shell metacharacters through the nonce.
Suggested Fix
Use safe file writing APIs instead of shell commands, or properly escape all user input for shell execution.
CRITICALInsecure APK Installation via PackageInstaller
apps/android/app/src/main/java/ai/openclaw/android/node/AppUpdateHandler.kt:106
[AGENTS: Razor]security
The app.update command downloads an APK from a user-controlled URL and installs it using PackageInstaller without proper validation. The URL host must match the connected gateway host, but the gateway could be malicious. The APK is downloaded to cache, SHA-256 verified, then installed via PackageInstaller session API. This allows remote code execution and privilege escalation if the gateway is compromised or if an attacker can MITM the connection.
Suggested Fix
Remove the app.update functionality entirely or restrict it to signed updates from a trusted source with certificate pinning. At minimum, require user confirmation before installation and validate the APK signature matches the app's signing certificate.
CRITICALNotification content accessed without user awareness
apps/android/app/src/main/java/ai/openclaw/android/node/DeviceNotificationListenerService.kt:13
[AGENTS: Warden]privacy
The DeviceNotificationListenerService accesses notification content including titles, text, and metadata from all apps on the device. While it requires notification listener access permission, users may not be aware of the extent of data being collected. The service can read sensitive information from notifications (messages, emails, alerts) and transmit them to the gateway.
Suggested Fix
Implement a privacy notice explaining exactly what notification data is accessed. Consider filtering out sensitive app notifications or allowing users to whitelist/blacklist specific apps.
CRITICALScreen recording capability
apps/android/app/src/main/java/ai/openclaw/android/node/ScreenHandler.kt:1
[AGENTS: Infiltrator]attack_surface
The ScreenHandler (referenced in InvokeDispatcher) can initiate screen recording. This could capture sensitive information displayed on screen, including passwords, banking details, and private messages.
Suggested Fix
Require explicit user consent for each screen recording session, with clear visual indicators that recording is active, and limit recording duration.
CRITICALAPI key passed in plaintext header
apps/android/app/src/main/java/ai/openclaw/android/voice/ElevenLabsStreamingTts.kt:124
[AGENTS: Vault]secrets
The ElevenLabs API key is passed in the 'xi-api-key' header in plaintext. While this is standard for API authentication, the key itself should be securely stored and retrieved, not hardcoded or stored insecurely elsewhere in the application.
Suggested Fix
Ensure the API key is stored securely (e.g., in Android Keystore or encrypted preferences) and retrieved at runtime.
CRITICALRemote code execution via curl pipe to bash
apps/macos/Sources/OpenClaw/CLIInstaller.swift:38
[AGENTS: Harbor]container_security
The installScriptCommand function constructs a command that downloads and executes a shell script from a remote URL (https://openclaw.bot/install-cli.sh) without proper verification. This is a classic 'curl | bash' pattern that is vulnerable to MITM attacks, DNS poisoning, or compromise of the remote server.
Suggested Fix
Download the script, verify its checksum against a known good value, then execute it. Alternatively, use a package manager or signed binary distribution.
CRITICALLLM task execution with arbitrary provider/model and no sandboxing
extensions/llm-task/src/llm-task-tool.ts:133
[AGENTS: Vector]attack_chains
The llm-task tool executes LLM calls with user-controlled provider/model parameters and no sandboxing. Attack chain: 1) Attacker specifies malicious model endpoint → 2) System makes request to attacker-controlled server → 3) Server returns malicious JSON → 4) JSON schema validation may be bypassed → 5) Arbitrary code execution or data exfiltration. This is a critical remote code execution vector.
Suggested Fix
Implement strict allowlists for providers/models, sandbox LLM execution, and validate all outputs.
CRITICALDirect LLM execution with user-controlled prompt and input
extensions/llm-task/src/llm-task-tool.ts:176
[AGENTS: Prompt]llm_security
The `createLlmTaskTool` function directly executes an LLM with user-provided `prompt` and `input` parameters. The user controls both the instruction and input data, enabling classic prompt injection attacks. The system concatenates user input directly into the LLM prompt without structural separation.
Suggested Fix
Implement strict input validation, use template systems with clear delimiters, separate system instructions from user content using different message roles, and add output validation against expected schema.
CRITICALDocker PostgreSQL setup uses trust authentication
extensions/open-prose/skills/prose/state/postgres.md:104
[AGENTS: Passkey]credentials
The example Docker setup for PostgreSQL uses '-e POSTGRES_HOST_AUTH_METHOD=trust' which disables password authentication entirely. This is an insecure configuration that should never be used in production or even development environments accessible from networks.
Suggested Fix
Use password authentication with strong passwords even in development. For local development, use socket authentication or at minimum require a password.
CRITICALTrusting X-Forwarded-* headers without proxy IP validation
extensions/voice-call/src/webhook-security.ts:236
[AGENTS: Phantom]api_security
The reconstructWebhookUrl function trusts X-Forwarded-* headers by default when trustForwardingHeaders is true, without requiring trustedProxyIPs. This could allow attackers to spoof the origin of requests.
Suggested Fix
Require trustedProxyIPs configuration when trustForwardingHeaders is enabled, or implement a default deny policy for forwarded headers.
CRITICALBrowser cookie import creates credential leakage risk
skills/ordercli/SKILL.md:58
[AGENTS: Gatekeeper]auth
The command 'ordercli foodora cookies chrome --profile "Default"' imports browser cookies which may contain authentication tokens. This could lead to token theft if the exported cookies are stored insecurely.
Suggested Fix
Add strong warnings about cookie security, recommend token-based auth instead, and ensure imported cookies are immediately encrypted.
CRITICALX API token storage without encryption
skills/xurl/SKILL.md:67
[AGENTS: Gatekeeper]auth
The documentation states 'Tokens are persisted to ~/.xurl in YAML format' without mentioning encryption at rest. Stolen tokens could give full access to X accounts.
Suggested Fix
Add encryption for token storage or recommend using system keyring. At minimum, set strict file permissions (600).
CRITICALCommand injection via exec tool parameters
src/agents/pi-embedded-runner/run.ts:140
[AGENTS: Razor]security
The code allows execution of shell commands via the exec tool. User-controlled parameters could inject malicious commands if not properly sanitized.
Suggested Fix
Implement strict command validation, use parameterized execution, and restrict allowed commands to a predefined allowlist.
CRITICALLLM-controlled config apply/patch without validation
src/agents/tools/gateway-tool.ts:177
[AGENTS: Prompt]llm_security
The gateway tool allows LLM agents to apply or patch gateway configuration via 'config.apply' and 'config.patch' actions. The LLM controls the raw config content, which could lead to privilege escalation, auth token changes, or service misconfiguration if the LLM is compromised via prompt injection.
Suggested Fix
Implement config validation against a schema, require user approval for config changes, or implement a dry-run mode that shows diff before applying.
CRITICALCross-tenant chat history access
src/agents/tools/sessions-list-tool.ts:155
[AGENTS: Tenant]tenant_isolation
The tool fetches chat history for sessions via 'chat.history' gateway call using 'resolvedKey' which may belong to another tenant. The history is fetched in parallel for multiple sessions without verifying the requester has access to each session's history.
Suggested Fix
Ensure each 'chat.history' call includes tenant/agent context validation on the server side, or filter historyTargets to only sessions owned by the requester.
CRITICALAuthentication mode 'none' allows unauthenticated access
src/cli/gateway-cli/run.ts:178
[AGENTS: Gatekeeper]auth
When gateway auth mode is set to 'none', all connections are unauthenticated. This is extremely dangerous when binding to non-loopback interfaces.
Suggested Fix
Disallow auth mode 'none' when binding to non-loopback interfaces, or require explicit confirmation with warnings.
CRITICALHardcoded API key in MiniMax provider configuration
src/commands/onboard-auth.config-minimax.ts:76
[AGENTS: Vault]secrets
The code hardcodes an API key value 'minimax' for the MiniMax provider configuration. This is a placeholder credential that should be configured externally.
Suggested Fix
Use environment variable or secret reference: apiKey: process.env.MINIMAX_API_KEY || ''
CRITICALDuplicate agent directories allow cross-tenant credential leakage
src/config/agent-dirs.ts:56
[AGENTS: Tenant]tenant_isolation
The findDuplicateAgentDirs function detects when multiple agents share the same agentDir, which causes 'auth/session state collisions and token invalidation'. This is a critical cross-tenant data leakage vector where Tenant A's credentials and session state could be accessible to Tenant B if they share the same directory.
Suggested Fix
Enforce strict isolation by preventing directory sharing and ensuring each tenant has unique, non-overlapping storage paths.
CRITICALMain session key resolution ignores tenant context
src/config/sessions/main-session.ts:20
[AGENTS: Tenant]tenant_isolation
The resolveMainSessionKey function determines session keys based on agent configuration without tenant context. In multi-tenant deployments, all tenants would share the same main session key, causing data leakage.
Suggested Fix
Incorporate tenant identifier into main session key resolution. Each tenant should have its own isolated main session.
CRITICALContainer namespace join bypasses sandbox isolation
src/config/types.sandbox.ts:61
[AGENTS: Specter]container_escape
The `dangerouslyAllowContainerNamespaceJoin` setting allows Docker `network: "container:<id>"` namespace joins, which can break sandbox isolation and allow container escape or privilege escalation.
Suggested Fix
Remove this setting entirely or implement mandatory security review before enabling.
CRITICALMultiple hardcoded credential fields in Slack configuration
src/config/types.slack.ts:197
[AGENTS: Vault]secrets
The SlackAccountConfig type includes botToken, appToken, userToken fields that typically contain sensitive authentication tokens. These should be marked as sensitive and stored securely.
Suggested Fix
Mark all token fields as sensitive in the schema and ensure they use SecretRef type for secure storage.
CRITICALTTS auto-mode with no limits
src/config/types.tts.ts:84
[AGENTS: Wallet]denial_of_wallet
TTS auto-mode can be set to 'always' or 'inbound' without character limits or budget controls, potentially generating TTS for all messages and exhausting API credits.
Suggested Fix
Require explicit character limits and daily caps when TTS auto-mode is enabled.
CRITICALGateway authentication tokens stored in plaintext
src/config/zod-schema.ts:229
[AGENTS: Vault]secrets
The gateway.auth schema includes 'token' and 'password' fields that are registered as sensitive but stored as plain text in configuration. These are authentication credentials for the gateway and should never be stored in plaintext.
Suggested Fix
Implement secure storage for gateway authentication tokens, such as using environment variables, encrypted storage, or a dedicated secrets management solution.
CRITICALInsecure WebSocket transport for sensitive data
src/gateway/call.ts:176
[AGENTS: Compliance]regulatory
The code allows plaintext ws:// connections to non-loopback addresses when OPENCLAW_ALLOW_INSECURE_PRIVATE_WS=1 is set, which violates SOC 2 CC6.1 (Logical Access Security) and PCI-DSS requirement 4.1 (Use strong cryptography and security protocols). Both credentials and chat/conversation data would be exposed to network interception over plaintext connections.
Suggested Fix
Remove the OPENCLAW_ALLOW_INSECURE_PRIVATE_WS environment variable override and enforce wss:// for all remote gateway URLs. If private network access is required, mandate SSH tunneling or VPN usage.
CRITICALPlaintext WebSocket connection to non-loopback addresses
src/gateway/call.ts:180
[AGENTS: Gatekeeper]auth
The buildGatewayConnectionDetails function allows plaintext ws:// connections to non-loopback addresses when OPENCLAW_ALLOW_INSECURE_PRIVATE_WS=1 is set. This exposes credentials and chat data to network interception (CWE-319, CVSS 9.8). While there's a warning, the bypass option remains dangerous.
Suggested Fix
Remove the OPENCLAW_ALLOW_INSECURE_PRIVATE_WS bypass entirely or require additional confirmation/audit logging when used.
CRITICALInsecure temporary file creation with predictable names
src/gateway/gateway-models.profiles.live.test.ts:140
[AGENTS: Razor]security
Temporary files are created with predictable names using randomUUID() in workspace directories. An attacker could predict or manipulate these paths to perform file injection attacks.
Suggested Fix
Use secure random file names, proper file permissions, and validate file operations to prevent path traversal and injection attacks.
CRITICALAuthentication profile storage without integrity protection
src/gateway/gateway-models.profiles.live.test.ts:1200
[AGENTS: Supply]supply_chain
The test copies authentication profiles to temporary directories without encrypting or signing them. This exposes sensitive authentication data and could allow credential theft in shared build environments.
Suggested Fix
Encrypt authentication profiles at rest and implement integrity checks using digital signatures. Never store credentials in plain text.
CRITICALGlobal node pairing state without tenant isolation
src/infra/node-pairing.ts:70
[AGENTS: Tenant]tenant_isolation
The node pairing system uses global `runningSessions` and `finishedSessions` maps that store pairing requests and paired nodes without tenant isolation. This allows cross-tenant node pairing visibility and potential pairing request spoofing.
Suggested Fix
Add tenant ID to session keys and maintain separate maps per tenant. For example: `const runningSessions = new Map<string, Map<string, ProcessSession>>()`.
CRITICALGlobal session binding adapter registry without tenant isolation
src/infra/outbound/session-binding-service.ts:144
[AGENTS: Tenant]tenant_isolation
The 'ADAPTERS_BY_CHANNEL_ACCOUNT' map stores binding adapters globally without tenant scoping. Adapters contain conversation references and binding records that could belong to different tenants, allowing cross-tenant binding operations.
Suggested Fix
Key adapters by tenantId+channel+accountId, or ensure all adapter operations validate tenant context before accessing binding data.
CRITICALCross-tenant session binding enumeration
src/infra/outbound/session-binding-service.ts:266
[AGENTS: Tenant]tenant_isolation
The 'listBySession' method iterates through ALL adapters in the global registry and returns bindings for the target session key without verifying the tenant context. This could return bindings from other tenants that happen to use the same session key pattern.
Suggested Fix
Filter adapters by tenant context before collecting bindings, or key bindings by tenantId+sessionKey.
CRITICALSQL injection via dynamic IN clause construction
src/memory/manager-embedding-ops.ts:112
[AGENTS: Syringe]db_injection
The `loadEmbeddingCache` method builds a SQL query with a dynamic IN clause using string concatenation: `SELECT hash, embedding FROM ${EMBEDDING_CACHE_TABLE} WHERE provider = ? AND model = ? AND provider_key = ? AND hash IN (${placeholders})`. The `placeholders` string is constructed by joining array elements with commas, but the hash values themselves are not parameterized - they're directly concatenated into the query string.
Suggested Fix
Use parameterized queries with individual placeholders for each hash value, or use a query builder that supports array parameters.
CRITICALVector search without tenant filtering
src/memory/manager-search.ts:1
[AGENTS: Tenant]tenant_isolation
The searchVector and searchKeyword functions query a shared database without tenant filtering in SQL queries. The sourceFilter parameter doesn't appear to include tenant filtering, potentially allowing cross-tenant data leakage in search results.
Suggested Fix
Add tenant_id column to chunks table and include tenant filtering in all queries. Ensure sourceFilter includes tenant scope.
CRITICALSQL injection via string concatenation in vector table creation
src/memory/manager-sync-ops.ts:240
[AGENTS: Syringe]db_injection
The code constructs SQL using string concatenation with user-controlled 'dimensions' parameter: `CREATE VIRTUAL TABLE IF NOT EXISTS ${VECTOR_TABLE} USING vec0( id TEXT PRIMARY KEY, embedding FLOAT[${dimensions}] )`. This allows SQL injection if 'dimensions' contains malicious SQL.
Suggested Fix
Validate 'dimensions' is a positive integer and use parameterized query or prepared statement.
CRITICALSQL injection via string concatenation in source filter
src/memory/manager-sync-ops.ts:275
[AGENTS: Syringe]db_injection
The code builds SQL WHERE clause with string concatenation: `const placeholders = sources.map(() => "?").join(", ");` and `return { sql: ` AND ${column} IN (${placeholders})`, params: sources };`. While placeholders are used, the column name is concatenated directly, allowing SQL injection if 'alias' is user-controlled.
Suggested Fix
Validate column name against a whitelist or use parameterized column names.
CRITICALSQL injection via string concatenation in embedding cache query
src/memory/manager-sync-ops.ts:301
[AGENTS: Syringe]db_injection
The code uses string concatenation to build SQL query: `SELECT provider, model, provider_key, hash, embedding, dims, updated_at FROM ${EMBEDDING_CACHE_TABLE}`. Table name is concatenated, allowing SQL injection if EMBEDDING_CACHE_TABLE is user-controlled.
Suggested Fix
Validate table name against a whitelist or use parameterized table names.
CRITICALSQL injection via string concatenation in embedding cache insert
src/memory/manager-sync-ops.ts:318
[AGENTS: Syringe]db_injection
The code uses string concatenation to build INSERT query: `INSERT INTO ${EMBEDDING_CACHE_TABLE} (provider, model, provider_key, hash, embedding, dims, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?)`. Table name is concatenated, allowing SQL injection.
Suggested Fix
Validate table name against a whitelist or use parameterized table names.
CRITICALSQL injection via string concatenation in vector table deletion
src/memory/manager-sync-ops.ts:355
[AGENTS: Syringe]db_injection
The code uses string concatenation to build DELETE query: `DELETE FROM ${VECTOR_TABLE} WHERE id IN (SELECT id FROM chunks WHERE path = ? AND source = ?)`. Table name is concatenated, allowing SQL injection.
Suggested Fix
Validate table name against a whitelist or use parameterized table names.
CRITICALSQL injection via string concatenation in FTS table deletion
src/memory/manager-sync-ops.ts:363
[AGENTS: Syringe]db_injection
The code uses string concatenation to build DELETE query: `DELETE FROM ${FTS_TABLE} WHERE path = ? AND source = ? AND model = ?`. Table name is concatenated, allowing SQL injection.
Suggested Fix
Validate table name against a whitelist or use parameterized table names.
CRITICALSQL injection via string concatenation in sourceFilter
src/memory/manager.ts:324
[AGENTS: Syringe]db_injection
The code builds SQL queries by directly concatenating user-controlled `sourceFilter.sql` string into the query without parameterization. This occurs in multiple places: line 324 (`SELECT COUNT(*) as c FROM files WHERE 1=1${sourceFilter.sql}`), line 328 (`SELECT COUNT(*) as c FROM chunks WHERE 1=1${sourceFilter.sql}`), and other similar patterns. The `sourceFilter.sql` string is constructed elsewhere and could contain malicious SQL if user input influences the filter conditions.
Suggested Fix
Use parameterized queries with placeholders instead of string concatenation. Ensure all WHERE clause conditions are passed as parameters to the prepared statement.
CRITICALSQL injection in GROUP BY queries with dynamic source filtering
src/memory/manager.ts:336
[AGENTS: Syringe]db_injection
The code constructs SQL queries with string concatenation for GROUP BY operations: `SELECT source, COUNT(*) as c FROM files WHERE 1=1${sourceFilter.sql} GROUP BY source` (line 336) and similar for chunks query (line 344). The `sourceFilter.sql` is concatenated directly into the query string, allowing SQL injection if user input influences the filter construction.
Suggested Fix
Use parameterized queries with proper placeholders for all WHERE conditions. Avoid dynamic SQL construction for filter clauses.
CRITICALLocal model loading without integrity checks
src/memory/node-llama.ts:1
[AGENTS: Weights]model_supply_chain
The importNodeLlamaCpp function loads local Llama models via node-llama-cpp without verifying model integrity, checksums, or digital signatures. Local model files could be tampered with to execute arbitrary code during loading.
Suggested Fix
Implement checksum verification for local model files, require signed model artifacts, and use SafeTensors format instead of unsafe pickle formats.
CRITICALCommand injection via spawn arguments
src/node-host/invoke.ts:90
[AGENTS: Razor]security
The runCommand function spawns child processes with user-controlled argv array without proper validation or sanitization. An attacker could inject shell commands through carefully crafted arguments, especially on systems where shell interpretation occurs.
Suggested Fix
Implement strict validation of command arguments, use execFile instead of spawn where possible, and consider using a safe argument parser that prevents shell metacharacter injection.
CRITICALCommand secrets resolution without tenant validation
src/secrets/runtime.ts:112
[AGENTS: Compliance, Tenant]regulatory, tenant_isolation
**Perspective 1:** resolveCommandSecretsFromActiveRuntimeSnapshot resolves secrets for commands without tenant validation. The targetIds parameter could include IDs from other tenants, allowing access to their secrets if the active snapshot contains multi-tenant data. **Perspective 2:** The resolveCommandSecretsFromActiveRuntimeSnapshot function accesses secrets without logging or audit trail. This violates SOC 2 CC7.1 (System Monitoring) and PCI-DSS Requirement 10.2 (Implement automated audit trails) as there's no record of who accessed what secrets, when, and for what purpose. No user identity, timestamp, or purpose is logged for secret access.
Suggested Fix
Add comprehensive audit logging before line 112 that records: timestamp, user/process identity, command name, target IDs, and which secrets were accessed.
CRITICALHooks allow arbitrary session key selection without tenant scoping
src/security/audit-extra.sync.ts:224
[AGENTS: Tenant]tenant_isolation
The hooks.allowRequestSessionKey=true configuration allows external hook payloads to choose session keys without tenant isolation. Combined with hooks.allowedSessionKeyPrefixes being empty, this enables cross-tenant session targeting in a multi-tenant environment.
Suggested Fix
Enforce tenant prefixes in allowedSessionKeyPrefixes and validate that request-provided session keys match the authenticated tenant's namespace.
CRITICALGateway HTTP APIs accessible without authentication
src/security/audit-extra.sync.ts:280
[AGENTS: Tenant]tenant_isolation
When gateway.auth.mode='none', HTTP endpoints like /tools/invoke, /v1/chat/completions, and /v1/responses are callable without any authentication. In a multi-tenant deployment, this exposes all tenant data to unauthenticated attackers.
Suggested Fix
Require authentication for all gateway HTTP endpoints. Implement tenant-aware authentication that validates caller's tenant membership.
CRITICALGateway HTTP APIs reachable without authentication
src/security/audit-extra.sync.ts:348
[AGENTS: Warden]privacy
When gateway.auth.mode='none', HTTP endpoints are callable without any authentication. This could expose sensitive data and processing capabilities to unauthorized parties, violating GDPR's security principle and potentially exposing personal data.
Suggested Fix
Require authentication for all HTTP APIs by default. If mode=none is required for specific use cases, implement IP restrictions and comprehensive audit logging.
CRITICALOpen group policies expose cross-tenant data leakage
src/security/audit-extra.sync.ts:520
[AGENTS: Tenant]tenant_isolation
groupPolicy='open' configurations combined with elevated tools or runtime/filesystem access create cross-tenant data leakage vectors. In multi-tenant deployments, prompt injection in open groups could access other tenants' data.
Suggested Fix
Enforce tenant isolation in group policies. Groups should be tenant-scoped, and open groups should not be allowed in multi-tenant deployments.
CRITICALUnconfined seccomp and AppArmor profiles
src/security/audit-extra.sync.ts:656
[AGENTS: Razor]security
The code detects when seccompProfile or apparmorProfile are set to 'unconfined', which disables critical Linux security features. These are correctly flagged as critical findings.
Suggested Fix
Consider rejecting 'unconfined' profiles during configuration validation rather than just flagging them in audits.
CRITICALOpen group policy with elevated tools enabled
src/security/audit-extra.sync.ts:958
[AGENTS: Razor]security
The collectExposureMatrixFindings function detects when groupPolicy='open' is combined with tools.elevated enabled. This could allow prompt injection to trigger high-impact actions.
Suggested Fix
Automatically disable elevated tools for open groups, or require additional security measures.
CRITICALDangerous bind mounts exposing host system directories
src/security/audit-extra.sync.ts:1000
[AGENTS: Harbor]containers
The code detects dangerous bind mounts in sandbox config that cover or target blocked paths like '/etc/passwd', '/run', or Docker socket paths. These mounts can expose host system directories or the Docker socket to sandbox containers.
Suggested Fix
Remove dangerous bind mounts and use project-specific paths instead of host system directories.
CRITICALGateway HTTP APIs accessible without authentication
src/security/audit-extra.sync.ts:1058
[AGENTS: Passkey]credentials
When gateway.auth.mode='none', the HTTP endpoints (/tools/invoke, /v1/chat/completions, /v1/responses) are callable without any authentication. This exposes sensitive functionality to unauthorized access.
Suggested Fix
Require authentication for all gateway HTTP endpoints by default, or at minimum enforce that mode='none' can only be used with gateway.bind='loopback'.
CRITICALOpen group policy with runtime/filesystem tools exposed
src/security/audit-extra.sync.ts:1105
[AGENTS: Wallet]denial_of_wallet
Open groups with runtime or filesystem tools exposed can lead to prompt injection attacks that execute arbitrary commands or file operations, potentially triggering expensive operations.
Suggested Fix
For open groups, enforce tools.profile='messaging' and deny runtime/fs tools, or require sandbox mode 'all'.
CRITICALGlobal external argument menu store without tenant isolation
src/slack/monitor/external-arg-menu-store.ts:38
[AGENTS: Tenant]tenant_isolation
The createSlackExternalArgMenuStore function creates a global Map store for Slack external argument menus without any tenant isolation. Tokens are stored in a shared Map, allowing potential cross-tenant data access if tokens from different tenants are stored in the same instance.
Suggested Fix
const store = new Map<string, { tenantId: string; entry: SlackExternalArgMenuEntry }>();
CRITICALDevice pairing list exposes all pending devices across tenants
ui/src/ui/controllers/devices.ts:59
[AGENTS: Tenant]tenant_isolation
The device.pair.list endpoint returns pending and paired devices without tenant filtering. In a multi-tenant system, this would expose all devices across all tenants to any authenticated user, allowing Tenant A to see and potentially approve/reject Tenant B's device pairing requests.
Suggested Fix
Add tenant_id parameter to device pairing operations and ensure backend enforces tenant isolation at the database level.
CRITICALExtracts Claude session keys from browser cookies and keychain
scripts/debug-claude-usage.ts:1
[AGENTS: Recon, Trace, Vault, Warden, Weights]info_disclosure, logging, model_supply_chain, privacy, secrets
**Perspective 1:** This script reads Claude AI session keys from Chrome/Firefox cookies and macOS keychain. It decrypts Chrome cookies using the system keychain password. This exposes sensitive authentication tokens that could be used to impersonate users. **Perspective 2:** The script reads and potentially exposes Claude AI session keys from browser cookie databases and keychain storage without proper consent or security controls. It extracts session tokens from Chrome, Firefox, and other browsers, which could expose user authentication credentials if the script output is logged or shared. **Perspective 3:** The script fetches and displays Claude API tokens, OAuth tokens, and session keys. While there's a mask() function, the --reveal flag can expose full tokens, and error responses may contain sensitive data in logs. **Perspective 4:** The script reveals multiple methods for extracting Claude API tokens from various sources (keychain, Chrome/Firefox cookies, environment variables), including specific cookie names ('sessionKey'), browser storage locations, and decryption methods. This information could help attackers develop targeted token extraction attacks. **Perspective 5:** The script loads Claude API tokens from multiple sources (environment variables, browser cookies, keychain) without verifying their authenticity. Compromised tokens could be used to make unauthorized model requests or exfiltrate sensitive data.
Suggested Fix
Remove or restrict access to this debugging script. If needed for debugging, ensure it runs only in secure environments and outputs are properly sanitized.
CRITICALUnverified remote script execution with root privileges
apps/macos/Sources/OpenClaw/CLIInstaller.swift:39
[AGENTS: Pedant, Supply]correctness, supply_chain
**Perspective 1:** The CLI installer downloads and executes a shell script from https://openclaw.bot/install-cli.sh without any integrity verification (checksum, signature). This is a critical supply chain vulnerability as an attacker could compromise the domain or perform a MITM attack to execute arbitrary code with elevated privileges. **Perspective 2:** The `installScriptCommand` function uses string interpolation to embed version and prefix into a shell command without proper escaping beyond basic single quotes. If these values contain single quotes or other shell metacharacters, they could break the command or cause injection.
Suggested Fix
Add SHA256 checksum verification of the downloaded script, implement code signing verification, or bundle the CLI installation script locally with the application.
CRITICALAutomatic npm install with arbitrary version from user input
extensions/acpx/src/ensure.ts:232
[AGENTS: Supply, Vector]attack_chains, supply_chain
**Perspective 1:** The ensureAcpx function automatically runs 'npm install' with user-controlled version input. Attack chain: 1) Attacker controls expectedVersion parameter → 2) System installs malicious npm package → 3) Package executes arbitrary code during install → 4) Full system compromise. Combined with other vulnerabilities, this provides persistence mechanism. **Perspective 2:** When installing acpx locally via npm install, no Software Bill of Materials (SBOM) is generated to track the transitive dependencies. This prevents vulnerability scanning and license compliance verification for the installed components.
Suggested Fix
Generate SPDX or CycloneDX SBOM after npm install and store it alongside the installed package for audit purposes.
CRITICALHardcoded API keys in test fixtures
src/commands/models/list.status.test.ts:30
[AGENTS: Egress, Vault]data_exfiltration, secrets
**Perspective 1:** Test file contains hardcoded API keys and tokens including 'sk-ant-oat01-ACCESS-TOKEN-1234567890', 'sk-ant-api-0123456789abcdefghijklmnopqrstuvwxyz', 'eyJhbGciOi-ACCESS', and 'sk-openai-0123456789abcdefghijklmnopqrstuvwxyz'. While these are test fixtures, they follow real credential patterns and could be accidentally used in production or leak sensitive patterns. **Perspective 2:** The test file contains hardcoded API keys (sk-ant-oat01-ACCESS-TOKEN-1234567890), refresh tokens (sk-ant-ort01-REFRESH-TOKEN-1234567890), and other authentication tokens in mock data. While these are test fixtures, they could be accidentally committed or exposed in test output, leading to credential leakage.
Suggested Fix
Use mock/fake credentials that don't resemble real credential patterns, or use environment variables for test credentials. Consider using dedicated test credential generators.
CRITICALHardcoded API keys in test code
src/commands/models/list.status.test.ts:31
[AGENTS: Cipher, Razor]cryptography, security
**Perspective 1:** The test contains hardcoded API keys like 'sk-ant-oat01-ACCESS-TOKEN-1234567890' and 'sk-openai-0123456789abcdefghijklmnopqrstuvwxyz'. While these are test credentials, they could be accidentally used in production or leak real key patterns. **Perspective 2:** The test file contains hardcoded API keys like 'sk-ant-oat01-ACCESS-TOKEN-1234567890' and 'sk-openai-0123456789abcdefghijklmnopqrstuvwxyz'. While these are test fixtures, they mimic real API key formats and could be accidentally used in production or leak sensitive patterns.
Suggested Fix
Use clearly fake test tokens that don't resemble real API key formats, or generate them dynamically with a clear 'TEST-' prefix to avoid confusion.
CRITICALOpen group policy with elevated tools enabled
src/security/audit-extra.sync.ts:1088
[AGENTS: Passkey, Wallet]credentials, denial_of_wallet
**Perspective 1:** When groupPolicy='open' and tools.elevated are enabled, prompt injection in open groups can trigger high-impact incidents including expensive API calls and resource consumption. **Perspective 2:** The code detects when gateway.auth.password is stored in the config file instead of using environment variables. This exposes credentials to anyone with read access to the config file.
Suggested Fix
Require explicit allowlists for elevated tools when group policy is open, or disable elevated tools in open groups.
CRITICALDevice token rotation exposes token in window.prompt() enabling token theft via screen capture/malware
ui/src/ui/controllers/devices.ts:125
[AGENTS: Exploit, Vector]attack_chains, business_logic
**Perspective 1:** The rotateDeviceToken function displays the new token in window.prompt(), making it visible on screen and vulnerable to: 1) Screen capture malware, 2) Shoulder surfing, 3) Remote desktop session recording. Combined with device pairing, this enables persistent access chain: 1) Gain initial access via other vulnerability, 2) Trigger token rotation, 3) Capture new token via screen capture, 4) Maintain persistent access even if original token is revoked. **Perspective 2:** After rotating a device token, the new token is displayed via window.prompt() which copies to clipboard. Malicious browser extensions or clipboard monitors could steal the token.
Suggested Fix
Never display tokens in UI. Use secure copy-to-clipboard with auto-clear. Implement token download with encryption. Use one-time display with immediate invalidation.
CRITICALInsecure WebSocket URL validation bypass via OPENCLAW_ALLOW_INSECURE_PRIVATE_WS
src/gateway/client.ts:119
[AGENTS: Chaos, Cipher, Compliance, Fuse, Gatekeeper, Gateway, Lockdown, Mirage, Passkey, Phantom, Razor, Sentinel, Siege, Specter, Vector]api_security, attack_chains, auth, configuration, credentials, cryptography, dos, edge_cases, edge_security, error_security, false_confidence, input_validation, regulatory, security, ssrf
**Perspective 1:** The code allows bypassing WebSocket security checks via the OPENCLAW_ALLOW_INSECURE_PRIVATE_WS=1 environment variable, which can enable plaintext ws:// connections to non-loopback addresses. This could allow SSRF attacks where an attacker-controlled gateway URL could be used to exfiltrate credentials and chat data over plaintext connections, or to connect to internal services via DNS rebinding or other SSRF techniques. **Perspective 2:** The code blocks plaintext ws:// connections to non-loopback addresses, but includes a break-glass environment variable OPENCLAW_ALLOW_INSECURE_PRIVATE_WS=1 that can override this security check. This creates a backdoor that could allow credentials and chat data to be exposed to MITM attacks if an attacker can set this environment variable or if it's enabled in production. **Perspective 3:** The code blocks plaintext ws:// connections to non-loopback addresses, but allows them when OPENCLAW_ALLOW_INSECURE_PRIVATE_WS=1 is set. This creates a security bypass where credentials and chat data can be intercepted via MITM attacks. The error message even documents how to bypass this security check. **Perspective 4:** The code allows plaintext ws:// connections to non-loopback addresses when OPENCLAW_ALLOW_INSECURE_PRIVATE_WS is set to '1', exposing credentials and chat data to MITM attacks. **Perspective 5:** The URL is parsed but not properly validated for malicious schemes, hostnames, or path traversal. The isSecureWebSocketUrl check is insufficient. **Perspective 6:** The code blocks plaintext ws:// connections to non-loopback addresses, but this is a warning rather than a hard enforcement. Regulatory frameworks like PCI-DSS and HIPAA require encryption of all sensitive data in transit, including credentials and chat/conversation data. The current implementation allows bypassing this security control via environment variable OPENCLAW_ALLOW_INSECURE_PRIVATE_WS=1, which violates encryption-at-transit requirements. **Perspective 7:** Lines 119-136 allow plaintext ws:// connections when OPENCLAW_ALLOW_INSECURE_PRIVATE_WS=1 is set. This bypasses security checks and could expose credentials and chat data to MITM attacks on untrusted networks. **Perspective 8:** The code allows plaintext ws:// connections to non-loopback addresses when OPENCLAW_ALLOW_INSECURE_PRIVATE_WS=1 is set. This exposes credentials and chat data to MITM attacks. The error message suggests this is a 'break-glass' option for trusted private networks, but it creates a dangerous configuration that could be exploited. **Perspective 9:** The code allows plaintext ws:// connections to non-loopback addresses when OPENCLAW_ALLOW_INSECURE_PRIVATE_WS=1 is set. This exposes credentials and chat data to MITM attacks. The security check warns but still allows the connection with this environment variable, creating a dangerous bypass mechanism. **Perspective 10:** The code allows plaintext WebSocket connections to non-loopback addresses when OPENCLAW_ALLOW_INSECURE_PRIVATE_WS=1 is set. This bypasses critical security protections against MITM attacks, exposing both credentials and chat data to network interception. The warning message acknowledges this is a security error but still provides a bypass mechanism. **Perspective 11:** The code checks for plaintext ws:// connections to non-loopback addresses and throws a security error, but includes an environment variable OPENCLAW_ALLOW_INSECURE_PRIVATE_WS=1 that bypasses this protection. This creates a false sense of security - users might think the system enforces secure connections, but a simple environment variable can disable it entirely. The error message even includes instructions on how to bypass the security check. **Perspective 12:** The GatewayClient enforces wss:// for remote connections but allows plaintext ws:// to loopback addresses. This creates a multi-step attack chain: 1) Attacker compromises network routing or DNS to redirect ws://127.0.0.1 traffic to their server, 2) Intercepts device tokens, credentials, and all chat/conversation data, 3) Uses stolen tokens to impersonate legitimate devices and gain admin access to the gateway. The OPENCLAW_ALLOW_INSECURE_PRIVATE_WS=1 bypass further weakens this protection. **Perspective 13:** The OPENCLAW_ALLOW_INSECURE_PRIVATE_WS=1 environment variable allows bypassing the security check that prevents plaintext ws:// connections. This creates a configuration-based auth bypass where attackers could set this variable to intercept credentials. **Perspective 14:** The code sets `rejectUnauthorized: false` and implements a custom `checkServerIdentity` function that only validates TLS certificate fingerprints. This bypasses standard certificate chain validation, making the connection vulnerable to man-in-the-middle attacks if an attacker can obtain a certificate with the same fingerprint. The fingerprint check is insufficient as it doesn't verify the certificate's validity period, issuer chain, or hostname matching. **Perspective 15:** The code implements certificate pinning via fingerprint matching but doesn't provide a secure fallback mechanism if the fingerprint changes (e.g., during legitimate certificate rotation). This could lead to service disruption or force users to disable security checks. **Perspective 16:** The WebSocket client sets maxPayload to 25MB but doesn't validate individual message sizes before parsing. An attacker could send many large messages to exhaust memory. **Perspective 17:** The code allows plaintext WebSocket connections to non-loopback addresses when OPENCLAW_ALLOW_INSECURE_PRIVATE_WS=1 is set. This creates a fail-open pattern where credentials and chat data could be exposed to MITM attacks if this environment variable is inadvertently set. The security check can be bypassed via configuration rather than requiring explicit code changes. **Perspective 18:** The TLS fingerprint validation (lines 119-138) sets rejectUnauthorized: false and uses a custom checkServerIdentity. An attacker with network position can: 1) Intercept TLS connection, 2) Present a valid certificate with matching fingerprint but different key material (if fingerprint collision is possible), 3) Bypass TLS validation entirely due to rejectUnauthorized: false. This enables MITM attacks even with fingerprint checking. **Perspective 19:** The security error message explicitly tells users how to bypass the security check by setting OPENCLAW_ALLOW_INSECURE_PRIVATE_WS=1. This educates potential attackers on how to disable security controls. **Perspective 20:** The code warns about insecure ws:// connections to non-loopback addresses but provides an override mechanism (`OPENCLAW_ALLOW_INSECURE_PRIVATE_WS=1`). This creates a security bypass that users might enable without understanding the risks. **Perspective 21:** The code allows plaintext ws:// connections to loopback addresses but blocks them for non-loopback. While loopback is generally safer, this creates inconsistent security policies that could be misunderstood or misconfigured.
Suggested Fix
Remove the OPENCLAW_ALLOW_INSECURE_PRIVATE_WS bypass entirely. Always require wss:// for remote connections. If private network connections are needed, enforce SSH tunneling or VPN requirements instead of plaintext bypass.
CRITICALRemote code execution via SCP command injection
src/auto-reply/reply/stage-sandbox-media.ts:327
[AGENTS: Razor, Sentinel, Vector, Wallet]attack_chains, denial_of_wallet, input_validation, security
**Perspective 1:** The scpFile function constructs shell commands with user-controlled remoteHost and remotePath parameters without proper sanitization. An attacker could chain: 1) Injecting shell metacharacters into remoteHost or remotePath, 2) Executing arbitrary commands on the host system, 3) Gaining persistent access via reverse shells. This is a critical RCE vector that enables complete system compromise. **Perspective 2:** The stageRemoteFileIntoRoot function uses SCP to fetch files from remote hosts based on ctx.MediaRemoteHost. While it uses normalizeScpRemoteHost, there may be insufficient validation of the remote host parameter, potentially allowing SSRF or command injection if the host parameter is maliciously crafted. **Perspective 3:** The scpFile function constructs shell commands with user-controlled remoteHost and remotePath parameters without proper sanitization, creating command injection vulnerabilities. **Perspective 4:** The stageRemoteFileIntoRoot function uses SCP to transfer remote files without file size limits. An attacker could specify extremely large remote files (multi-gigabyte) that would consume significant bandwidth and storage resources during transfer and staging.
Suggested Fix
Implement strict whitelist validation for remote hosts, use URL parsing and validation, and consider using a restricted SSH configuration. Add timeout and size limits for SCP operations.
CRITICALDangerous sandbox container configuration overrides
src/config/types.sandbox.ts:55
[AGENTS: Blacklist, Gateway, Infiltrator, Phantom, Razor]attack_surface, authorization, content_security, edge_security, security
**Perspective 1:** Multiple 'dangerouslyAllow*' flags (dangerouslyAllowReservedContainerTargets, dangerouslyAllowExternalBindSources, dangerouslyAllowContainerNamespaceJoin) can completely bypass sandbox isolation, effectively disabling container security. **Perspective 2:** Multiple 'dangerouslyAllow*' flags (dangerouslyAllowReservedContainerTargets, dangerouslyAllowExternalBindSources, dangerouslyAllowContainerNamespaceJoin) can completely bypass sandbox isolation if misconfigured. **Perspective 3:** Multiple dangerouslyAllow* flags (dangerouslyAllowReservedContainerTargets, dangerouslyAllowExternalBindSources, dangerouslyAllowContainerNamespaceJoin) allow complete bypass of sandbox isolation when enabled. **Perspective 4:** Multiple dangerouslyAllow* flags (dangerouslyAllowReservedContainerTargets, dangerouslyAllowExternalBindSources, dangerouslyAllowContainerNamespaceJoin) can disable sandbox security controls, potentially allowing container escape or host system access. **Perspective 5:** Multiple 'dangerouslyAllow*' flags in SandboxDockerSettings allow bypassing security restrictions: dangerouslyAllowReservedContainerTargets, dangerouslyAllowExternalBindSources, dangerouslyAllowContainerNamespaceJoin.
Suggested Fix
Require explicit authentication/authorization for enabling these flags, add audit logging when they're used, and consider separating them into a separate 'unsafe' configuration section with clear warnings.
CRITICALTrust-all X509TrustManager used for TLS fingerprint probing
apps/android/app/src/main/java/ai/openclaw/android/gateway/GatewayTls.kt:91
[AGENTS: Cipher, Gateway, Harbor, Infiltrator, Lockdown, Mirage, Passkey, Phantom, Razor, Specter, Supply, Tripwire]api_security, attack_surface, configuration, containers, credentials, cryptography, dependencies, edge_security, false_confidence, security, ssrf, supply_chain
**Perspective 1:** The probeGatewayTlsFingerprint function creates a trust-all X509TrustManager that accepts any certificate without validation. This is used to probe TLS fingerprints but could be exploited if this code path is accessible to attackers or if the function is misused. **Perspective 2:** The probeGatewayTlsFingerprint function creates a custom X509TrustManager that blindly accepts all server certificates without validation. This completely disables TLS certificate verification, making the fingerprint probing vulnerable to man-in-the-middle attacks. The trust manager overrides both checkClientTrusted and checkServerTrusted to do nothing, accepting any certificate chain. **Perspective 3:** The probeGatewayTlsFingerprint function creates a custom X509TrustManager that trusts all certificates without validation. This is used to probe TLS fingerprints but could be exploited if this code path is reused elsewhere or if an attacker can trigger fingerprint probing. **Perspective 4:** The probeGatewayTlsFingerprint function uses a trust-all X509TrustManager that accepts any certificate without validation. This is used to probe TLS fingerprints but could be exploited if called with attacker-controlled parameters. **Perspective 5:** The probeGatewayTlsFingerprint function uses a trust-all X509TrustManager that accepts any certificate without validation. This completely disables TLS certificate validation during fingerprint probing, making the connection vulnerable to man-in-the-middle attacks. **Perspective 6:** The probeGatewayTlsFingerprint function uses a trust-all X509TrustManager that accepts any certificate. This could be exploited for SSRF attacks if an attacker can control the host/port parameters, allowing them to probe internal services. **Perspective 7:** The probeGatewayTlsFingerprint function uses a trust-all X509TrustManager that accepts any certificate, exposing the fingerprint probing to MITM attacks. **Perspective 8:** The probeGatewayTlsFingerprint function uses a trust-all X509TrustManager that accepts any certificate without validation. This could be exploited if an attacker controls the network during fingerprint probing. **Perspective 9:** The `probeGatewayTlsFingerprint` function creates a trust-all SSL context that accepts any certificate. This is used to probe TLS fingerprints but could be abused if not properly isolated or if the function is called inappropriately. **Perspective 10:** The probeGatewayTlsFingerprint function creates a custom X509TrustManager that trusts all certificates (@SuppressLint("TrustAllX509TrustManager")). This function is used to probe TLS fingerprints but could be misused or exploited to bypass certificate validation in the supply chain. **Perspective 11:** The probeGatewayTlsFingerprint function uses a custom X509TrustManager that trusts all certificates (checkServerTrusted and checkClientTrusted are empty implementations). This creates security theater - the function appears to securely probe TLS fingerprints but actually accepts any certificate during the probe, making it vulnerable to MITM attacks during the fingerprint collection phase. **Perspective 12:** The probeGatewayTlsFingerprint function creates a custom X509TrustManager that trusts all certificates without validation (@SuppressLint("TrustAllX509TrustManager")). This is used to probe TLS fingerprints but could be exploited if this function is exposed or misused elsewhere.
Suggested Fix
Replace the trust-all manager with proper certificate validation. If fingerprint probing is needed, use a trust manager that validates certificates against system trust stores and only bypasses hostname verification if absolutely necessary.
CRITICALNotification data exposed without filtering
apps/android/app/src/main/java/ai/openclaw/android/node/DeviceNotificationListenerService.kt:1
[AGENTS: Chaos, Harbor, Infiltrator, Phantom, Razor, Vector]attack_chains, attack_surface, containers, data_exposure, edge_cases, security
**Perspective 1:** The DeviceNotificationListenerService captures ALL device notifications and makes them available to the gateway without any filtering or user authorization. This includes sensitive notifications from banking apps, messaging apps, email, etc. The service even captures notifications from the app itself (packageName == packageName) but doesn't filter them out consistently. **Perspective 2:** The DeviceNotificationListenerService reads all notifications (including sensitive ones) and sends them to the gateway via nodeEventSink. This includes titles, text, package names, and allows the gateway to dismiss notifications or trigger replies. A compromised gateway could read all notifications and interact with them. **Perspective 3:** The onNotificationPosted method calls sbn?.toEntry() but doesn't handle the case where sbn is null or sbn.packageName is null. Also, the key generation could produce collisions if postTime is 0. **Perspective 4:** The notification listener service reads all notifications from all apps and can send them to the gateway. This includes potentially sensitive information from banking apps, messaging apps, etc. While permission is required, once granted, all notifications are accessible. **Perspective 5:** The DeviceNotificationListenerService has access to all device notifications, including sensitive information from banking apps, messaging apps, etc. This data is exposed to the gateway via the 'notifications.changed' event and can be queried via the notifications handler. **Perspective 6:** The DeviceNotificationListenerService has full access to all device notifications, including those containing 2FA codes, password reset links, and sensitive messages. Combined with gateway compromise, this enables sophisticated attacks: 1) Attacker compromises gateway, 2) Gateway requests notification access, 3) Attacker intercepts banking 2FA codes, 4) Attacker uses intercepted codes to bypass authentication on other services. The service can also dismiss security alerts and reply to messages, enabling social engineering attacks.
Suggested Fix
Implement notification filtering based on user preferences and sensitivity. Exclude notifications from sensitive apps (banking, email, messaging) by default unless explicitly authorized by the user.
CRITICALShell injection in install script command construction
apps/macos/Sources/OpenClaw/CLIInstaller.swift:71
[AGENTS: Syringe]command_injection
The installScriptCommand function constructs a shell command using string interpolation with shellEscape, but the shellEscape method uses single quotes which can be bypassed in some shell contexts. The command is then passed to bash -lc, creating a shell injection vector if version or prefix parameters contain malicious content.
Suggested Fix
Use Process with separate arguments instead of constructing a shell command string. Pass version and prefix as environment variables rather than interpolating into the command string.
CRITICALCommand injection vulnerability in runShell request
apps/macos/Sources/OpenClawIPC/IPC.swift:133
[AGENTS: Razor]security
The runShell command accepts arbitrary command arrays without proper validation. An attacker could inject shell commands through carefully crafted command arrays.
Suggested Fix
Implement strict command validation, use allowlists for permitted commands, and avoid shell invocation when possible. Use execve-style execution without shell interpretation.
CRITICALPrivilege escalation via command allowlist manipulation
extensions/phone-control/index.ts:191
[AGENTS: Razor]security
The disarmNow function restores commands to the deny list that were previously removed. However, if an attacker gains control of the state file, they could add arbitrary commands to the allowlist, effectively bypassing security controls.
Suggested Fix
Implement command allowlist validation, restrict which commands can be armed/disarmed, and add integrity checks to state files.
CRITICALiMessage/SMS access enables complete communication compromise
skills/imsg/SKILL.md:123
[AGENTS: Vector]attack_chains
The imsg skill provides direct access to macOS Messages.app, allowing reading and sending iMessages/SMS. An attacker with access to this skill could read all messages, send malicious messages to contacts, and use the device for social engineering attacks. Combined with automation permissions, this creates a critical attack vector.
Suggested Fix
Implement strict access controls, require explicit approval for message sending, audit all message access, and implement anomaly detection for message patterns.
CRITICALDocker command injection via sandbox arguments
src/agents/bash-tools.exec-runtime.ts:284
[AGENTS: Razor]security
The buildDockerExecArgs function constructs Docker command arguments with user-controlled inputs (containerName, command, workdir, env). An attacker could inject additional Docker flags or commands through these parameters, potentially escaping the container or executing arbitrary commands on the host.
Suggested Fix
Implement strict validation and sanitization of all parameters passed to Docker. Use parameterized arguments rather than string concatenation. Consider using Docker's exec API with proper JSON payloads instead of command-line construction.
CRITICALDocker command injection via user-controlled parameters
src/agents/sandbox/browser.ts:58
[AGENTS: Razor]security
The execDocker function is called with various user-controlled parameters (container names, network names, etc.) without proper sanitization. An attacker could inject Docker commands through parameters like containerPrefix, scopeKey, or workspaceDir.
Suggested Fix
Implement strict validation of all parameters passed to Docker commands, using allowlists for safe characters and escaping special shell characters.
CRITICALLLM-controlled system update execution
src/agents/tools/gateway-tool.ts:203
[AGENTS: Prompt]llm_security
The gateway tool's 'update.run' action allows LLM agents to trigger system updates with arbitrary timeout values. This could be exploited via prompt injection to cause system instability, deploy malicious updates, or disrupt service.
Suggested Fix
Require explicit user authorization for updates, implement update verification, or restrict update capabilities to specific trusted sources only.
CRITICALCommand injection in bash command execution
src/auto-reply/reply/bash-command.ts:93
[AGENTS: Prompt, Razor, Sentinel]input_validation, llm_security, security
**Perspective 1:** The parseBashRequest function extracts commands from user input and passes them directly to execTool.execute() without proper sanitization. An attacker could inject shell metacharacters to execute arbitrary commands. **Perspective 2:** The parseBashRequest function extracts commands from user input (via '/bash' or '!' prefixes) and passes them directly to execTool.execute() without sanitization or validation. This allows users to execute arbitrary shell commands through the LLM interface, creating a command injection vulnerability. **Perspective 3:** The parseBashRequest function extracts command text without sanitization. While this is passed to execTool.execute, additional validation could prevent issues.
Suggested Fix
Implement strict command validation, whitelist allowed commands, or use parameterized execution with proper escaping. Consider using a restricted shell or command sandbox.
CRITICALHardcoded redaction sentinel value exposed in code
src/config/redact-snapshot.ts:68
[AGENTS: Vault]secrets
The constant REDACTED_SENTINEL = '__OPENCLAW_REDACTED__' is hardcoded in the source code. This sentinel value is used to replace sensitive config fields in gateway responses. If attackers know this sentinel value, they could potentially identify redacted fields and attempt to reconstruct or bypass redaction mechanisms.
Suggested Fix
Generate a random sentinel value at runtime or use a cryptographically secure random string that's not exposed in source code.
CRITICALDangerous exec secret provider configuration
src/config/types.secrets.ts:195
[AGENTS: Phantom, Razor, Specter]command_injection, data_exposure, security
**Perspective 1:** The ExecSecretProviderConfig allows arbitrary command execution with allowSymlinkCommand and allowInsecurePath options that could lead to command injection or path traversal attacks. **Perspective 2:** ExecSecretProviderConfig.allowSymlinkCommand allows symlink commands which could be exploited for path traversal attacks. **Perspective 3:** The `allowSymlinkCommand` setting permits execution of symlinked commands, which could be exploited through symlink attacks to execute arbitrary binaries.
Suggested Fix
Remove allowSymlinkCommand and allowInsecurePath options, or require strict validation and security review for their use.
CRITICALSensitive owner display secret configuration
src/config/zod-schema.session.ts:215
[AGENTS: Vault]secrets
The schema defines ownerDisplaySecret field marked as sensitive but stored in plain configuration. This secret is used for hashing owner IDs and should be properly secured.
Suggested Fix
Ensure ownerDisplaySecret is always stored as a secret reference (SecretRef) rather than plain text, and enforce encryption at rest.
CRITICALInsecure session store updates with merge
src/gateway/server-methods/agent.ts:383
[AGENTS: Razor]security
The `mergeSessionEntry` function merges user-controlled data into session entries without proper validation. An attacker could potentially inject malicious data into session store.
Suggested Fix
Validate all fields being merged into session entries. Use type-safe merging with explicit field allowlist.
CRITICALHooks token must not match gateway auth token
src/gateway/startup-auth.ts:256
[AGENTS: Phantom]authentication
The code throws an error when hooks.token matches gateway auth token, but this is a runtime check rather than a prevention mechanism. An attacker could still configure them to be the same.
Suggested Fix
Implement automatic generation of distinct tokens or stronger validation at configuration time.
CRITICALRemote command execution via exec-host socket
src/infra/exec-host.ts:1
[AGENTS: Compliance, Infiltrator, Specter]attack_surface, os_command_injection, regulatory
**Perspective 1:** The exec-host functionality allows remote execution of arbitrary commands via a socket interface. The 'command' parameter in ExecHostRequest is passed directly to execution, enabling full command injection if the socket authentication (HMAC) is bypassed or weak. **Perspective 2:** The exec host request/response mechanism executes commands via socket but doesn't log the full command context, user identity, or approval decisions. PCI-DSS requirement 10.2 requires audit trails for all individual user access to cardholder data, and SOC 2 CC7.1 requires monitoring for unauthorized activities. **Perspective 3:** The exec host functionality provides a socket-based API for executing commands with HMAC authentication. This creates a remote code execution endpoint that, if the socket path or token is compromised, could allow arbitrary command execution. The API accepts command arrays, cwd, env, timeout, and other execution parameters.
Suggested Fix
Add comprehensive audit logging including user identity, command context, approval decisions, and execution results to a secure audit log.
CRITICALHardcoded JWT signing algorithm with no algorithm validation
src/infra/push-apns.ts:58
[AGENTS: Razor]security
The JWT generation uses a hardcoded ES256 algorithm without validating the algorithm in the token. This could lead to algorithm confusion attacks if an attacker can provide tokens with different algorithms.
Suggested Fix
Use a JWT library that validates the algorithm header matches the expected algorithm, or implement explicit algorithm validation.
CRITICALMissing CSPRNG implementation for secure UUID generation
src/infra/secure-random.js:1
[AGENTS: Entropy]randomness
The code imports and uses `generateSecureUuid()` function from `../infra/secure-random.js` in multiple files (web/outbound.ts, etc.), but the implementation of this function is not shown in the diff. If this function doesn't use a cryptographically secure random number generator (CSPRNG), it could lead to predictable UUIDs that compromise security.
Suggested Fix
Ensure `generateSecureUuid()` uses `crypto.randomUUID()` (Node.js 14.17+) or `crypto.randomBytes()` with proper UUID v4 formatting.
CRITICALSQL injection via string concatenation in file hash query
src/memory/manager-sync-ops.ts:432
[AGENTS: Syringe]db_injection
The code uses string concatenation to build SELECT query: `SELECT hash FROM files WHERE path = ? AND source = ?`. While parameters are used for values, the table and column names are hardcoded but could be vulnerable if the code is reused with user-controlled table/column names.
Suggested Fix
Ensure table and column names are never derived from user input.
CRITICALSQL injection via string concatenation in stale rows query
src/memory/manager-sync-ops.ts:455
[AGENTS: Syringe]db_injection
The code uses string concatenation to build SELECT query: `SELECT path FROM files WHERE source = ?`. Table name is concatenated, allowing SQL injection if 'files' is user-controlled.
Suggested Fix
Validate table name against a whitelist.
CRITICALSQL injection via string concatenation in file deletion
src/memory/manager-sync-ops.ts:462
[AGENTS: Syringe]db_injection
The code uses string concatenation to build DELETE query: `DELETE FROM files WHERE path = ? AND source = ?`. Table name is concatenated, allowing SQL injection.
Suggested Fix
Validate table name against a whitelist.
CRITICALSQL injection via string concatenation in vector table cleanup
src/memory/manager-sync-ops.ts:466
[AGENTS: Syringe]db_injection
The code uses string concatenation to build DELETE query: `DELETE FROM ${VECTOR_TABLE} WHERE id IN (SELECT id FROM chunks WHERE path = ? AND source = ?)`. Table name is concatenated, allowing SQL injection.
Suggested Fix
Validate table name against a whitelist.
CRITICALSQL injection via string concatenation in chunks deletion
src/memory/manager-sync-ops.ts:472
[AGENTS: Syringe]db_injection
The code uses string concatenation to build DELETE query: `DELETE FROM chunks WHERE path = ? AND source = ?`. Table name is concatenated, allowing SQL injection.
Suggested Fix
Validate table name against a whitelist.
CRITICALSQL injection via string concatenation in FTS table cleanup
src/memory/manager-sync-ops.ts:476
[AGENTS: Syringe]db_injection
The code uses string concatenation to build DELETE query: `DELETE FROM ${FTS_TABLE} WHERE path = ? AND source = ? AND model = ?`. Table name is concatenated, allowing SQL injection.
Suggested Fix
Validate table name against a whitelist.
CRITICALSQL injection via string concatenation in session file hash query
src/memory/manager-sync-ops.ts:524
[AGENTS: Syringe]db_injection
The code uses string concatenation to build SELECT query: `SELECT hash FROM files WHERE path = ? AND source = ?`. Table name is concatenated, allowing SQL injection.
Suggested Fix
Validate table name against a whitelist.
CRITICALSQL injection via string concatenation in session stale rows query
src/memory/manager-sync-ops.ts:547
[AGENTS: Syringe]db_injection
The code uses string concatenation to build SELECT query: `SELECT path FROM files WHERE source = ?`. Table name is concatenated, allowing SQL injection.
Suggested Fix
Validate table name against a whitelist.
CRITICALSQL injection via string concatenation in session file deletion
src/memory/manager-sync-ops.ts:554
[AGENTS: Syringe]db_injection
The code uses string concatenation to build DELETE query: `DELETE FROM files WHERE path = ? AND source = ?`. Table name is concatenated, allowing SQL injection.
Suggested Fix
Validate table name against a whitelist.
CRITICALSQL injection via string concatenation in session vector table cleanup
src/memory/manager-sync-ops.ts:558
[AGENTS: Syringe]db_injection
The code uses string concatenation to build DELETE query: `DELETE FROM ${VECTOR_TABLE} WHERE id IN (SELECT id FROM chunks WHERE path = ? AND source = ?)`. Table name is concatenated, allowing SQL injection.
Suggested Fix
Validate table name against a whitelist.
CRITICALSQL injection via string concatenation in session chunks deletion
src/memory/manager-sync-ops.ts:564
[AGENTS: Syringe]db_injection
The code uses string concatenation to build DELETE query: `DELETE FROM chunks WHERE path = ? AND source = ?`. Table name is concatenated, allowing SQL injection.
Suggested Fix
Validate table name against a whitelist.
CRITICALSQL injection via string concatenation in session FTS table cleanup
src/memory/manager-sync-ops.ts:568
[AGENTS: Syringe]db_injection
The code uses string concatenation to build DELETE query: `DELETE FROM ${FTS_TABLE} WHERE path = ? AND source = ? AND model = ?`. Table name is concatenated, allowing SQL injection.
Suggested Fix
Validate table name against a whitelist.
CRITICALSQL injection via string concatenation in meta table query
src/memory/manager-sync-ops.ts:1019
[AGENTS: Syringe]db_injection
The code uses string concatenation to build SELECT query: `SELECT value FROM meta WHERE key = ?`. Table name is concatenated, allowing SQL injection.
Suggested Fix
Validate table name against a whitelist.
CRITICALSQL injection via string concatenation in meta table upsert
src/memory/manager-sync-ops.ts:1036
[AGENTS: Syringe]db_injection
The code uses string concatenation to build INSERT/UPDATE query: `INSERT INTO meta (key, value) VALUES (?, ?) ON CONFLICT(key) DO UPDATE SET value=excluded.value`. Table name is concatenated, allowing SQL injection.
Suggested Fix
Validate table name against a whitelist.
CRITICALSQL injection via string concatenation in index reset
src/memory/manager-sync-ops.ts:1086
[AGENTS: Syringe]db_injection
The code uses string concatenation to build DELETE queries: `DELETE FROM files`, `DELETE FROM chunks`, `DELETE FROM ${FTS_TABLE}`. Table names are concatenated, allowing SQL injection.
Suggested Fix
Validate table names against a whitelist.
CRITICALCross-tenant secret application
src/secrets/apply.ts:245
[AGENTS: Tenant]tenant_isolation
The applyConfigTargetMutations function applies secret configurations without tenant isolation. If multiple tenants share the same configuration file structure, secrets from one tenant could be applied to another tenant's configuration.
Suggested Fix
Add tenant namespace to configuration paths. Ensure each tenant's secrets are isolated in separate configuration sections or files.
>