Back to skill

Security audit

WhatsApp Utils

Security checks for vulnerabilities and agentic risk

Overview

This WhatsApp utility is mostly coherent, but its contact export can expose an entire local contact list without a warning or confirmation step.

Review before installing if your OpenClaw WhatsApp state contains real contacts. Only run export-contacts when you intentionally want the full local contact list printed into the agent output, and prefer adding an explicit confirmation flag, filtering, or redaction before routine use.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/utils.js:93
Finding

WhatsApp Contact PII Exposed Through Standard Output

Content
View full analysis
id.endsWith('@s.whatsapp.net')) .map(([id, c]) => ({ phone: id.replace('@s.whatsapp.net', ''), name: c.name || c.notify || null, isBusiness: c.isBusiness || false })); console.log(JSON.stringify({ total: exported.length, contacts: exported }, null, 2)); } catch (error) { console.log(JSON.stringify({ error: error.message })); } } ``` ### Technical Analysis The `export-contacts` command reads `contacts.json` from the OpenClaw WhatsApp credential-state directory and prints the entire contact list to standard output. The disclosed fields include telephone numbers, contact names, and business-account status. Although exporting contacts is an advertised feature, returning the complete dataset through standard output creates a secondary disclosure channel. Output from agent-executed commands may be incorporated into conversation history, execution traces, monitoring systems, CI logs, or other records with broader access and longer retention than the source credential directory. The implementation does not request explicit confirmation, support record selection, redact sensitive fields, or restrict the volume of personal data returned. ### Attack Path 1. The attacker or an untrusted workflow obtains the ability to invoke this skill in a context that can access the user's OpenClaw state directory. 2. The attacker invokes `node scr ...[truncated 1177 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/utils.js:117
Finding

Message IDs Generated with a Non-Cryptographic PRNG

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
85% confidence
Finding

The skill documents execution of a Node.js script via exec but does not declare any explicit tool scope or permissions boundaries in the skill metadata. This creates ambiguity about what runtime capabilities are intended and can allow a broader-than-necessary execution environment, increasing the risk of misuse or unintended access to environment data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill exposes an export-contacts command, which implies bulk access to potentially sensitive personal data, but provides no warning, consent requirement, or description of privacy implications. In the context of a WhatsApp automation utility, contact data is especially sensitive because it may include personally identifiable information and relationship metadata.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The code automatically prepends country code 55 when the number length matches local formats, and the comment states this defaults to Brazil. This imposes a locale-specific behavior without user opt-in or a documented regional constraint, which can violate language/locale policy expectations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The export-contacts command reads contacts.json from the WhatsApp credential store and prints a full list of phone numbers, names, and business flags to stdout with no consent check, access control, masking, or warning. In an agent skill context, this creates a real privacy and data-exposure risk because invoking the utility can exfiltrate personal contact data from a local WhatsApp cache into logs, downstream tools, or user-visible output.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.