Back to skill

Security audit

WhatsApp Common Groups

Security checks for vulnerabilities and agentic risk

Overview

The skill exposes private WhatsApp group and contact relationship data from local credential-state files with weak scoping and disclosure.

Review before installing. Use only if you are comfortable allowing the skill to inspect local WhatsApp state and reveal group membership relationships. Avoid using the bulk all-members command unless you explicitly intend to enumerate private contact metadata.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/common.js:7
Finding

Direct Enumeration of Sensitive WhatsApp Credential-State Metadata

Content
View full analysis
f.startsWith('sender-key-') && f.includes('@g.us') && f.includes(cleanPhone) ); ``` ```javascript const contactsPath = path.join(CREDS_PATH, 'contacts.json'); if (fs.existsSync(contactsPath)) { const contacts = JSON.parse(fs.readFileSync(contactsPath, 'utf8')); ``` ```javascript const files = fs.readdirSync(CREDS_PATH); const found = files.some(f => f.startsWith('sender-key-') && f.includes(groupId) && f.includes(cleanPhone) ); ``` ```javascript const files = fs.readdirSync(CREDS_PATH); for (const file of files) { if (file.startsWith('sender-key-') && file.includes('@g.us')) { const match = file.match(/--(\d+)_/); if (match) { const phone = match[1]; if (!members.has(phone)) { members.set(phone, { phone, groupCount: 0 }); } members.get(phone).groupCount++; } } } ``` ### Technical Analysis The skill directly reads OpenClaw's WhatsApp credential-state directory instead of using a purpose-built, access-controlled interface. It enumerates sender-key filenames and reads `contacts.json` to derive phone numbers, group identifiers, group names, membership relationships, and group participation counts. Although the documented purpose includes finding shared groups and checking membership, the implementation crosses into credential storage and exposes underlying social-graph metadata. In particular, the `all-members` operation ...[truncated 1762 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/common.js:19
Finding

Insufficient Input Validation Causes Overbroad Enumeration and False Membership Results

Content
View full analysis
f.startsWith('sender-key-') && f.includes('@g.us') && f.includes(cleanPhone) ); ``` ```javascript function checkInGroup(phone, groupId) { const cleanPhone = phone.replace(/\D/g, ''); try { const files = fs.readdirSync(CREDS_PATH); const found = files.some(f => f.startsWith('sender-key-') && f.includes(groupId) && f.includes(cleanPhone) ); ``` ```javascript const result = Array.from(members.values()) .sort((a, b) => b.groupCount - a.groupCount) .slice(0, parseInt(limit)); ``` ```javascript case 'all-members': listAllMembers(arg1 || 50); break; ``` ### Technical Analysis Phone input is normalized by deleting every non-digit character, but the resulting value is not checked for emptiness, valid length, or valid E.164 structure. In JavaScript, every string contains the empty string. Consequently, an input such as `abc` produces `cleanPhone === ""`, causing `f.includes(cleanPhone)` to evaluate to `true` for every candidate filename. Both phone numbers and group IDs are matched using substring searches rather than exact, parsed field comparisons. A short phone fragment or partial group identifier may therefore match unrelated sender-key files and produce false membership assertions. The `all-members` limit is passed to `parseInt` without checking whether the result is finite, positive, or within an acceptable maximum. This permits invalid, negative, or excessively large values. While this does not create code execution, it w ...[truncated 1760 chars]
Remediation
View remediation
0 ? Math.min(parsedLimit, 100) : 50; ``` 7. Add tests for empty input, alphabetic input, punctuation-only input, partial phone numbers, partial group IDs, malformed limits, negative limits, and excessively large limits. 8. Do not use membership results for authorization decisions unless the result comes from an authoritative API and exact identifiers have been validated. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (6)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared purpose is narrowly framed around shared groups and membership checks, but the documented commands include broader enumeration of all known members across groups. That mismatch can mislead users and systems into authorizing a skill that performs much wider social-graph and contact-data extraction than expected, creating significant privacy and surveillance risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script directly reads local WhatsApp credential/state data from the OpenClaw state directory and derives sensitive group membership information without any warning, consent flow, or confirmation step. In this skill context, that is especially dangerous because group membership and contact associations are highly sensitive metadata, and the tool operationalizes silent extraction of that data for enumeration.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill exposes code execution of a local Node.js script with data-access capability but does not declare any tool scope, permissions, or allowed-tools boundaries. This makes the skill's effective capabilities opaque to reviewers and callers, increasing the chance of unintended access to local environment, credentials, or contact metadata.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill documentation presents group-membership lookup and bulk member enumeration without any privacy warning, consent guidance, or limitation statement. Because WhatsApp group membership and shared-contact relationships are sensitive social-graph data, omission of privacy warnings makes misuse more likely and reduces informed user consent.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill’s stated purpose is limited to finding shared groups and checking specific membership, but this function enumerates all known members across all groups and ranks them by participation. That broadens access from targeted lookups to bulk social-graph intelligence gathering, enabling privacy-invasive enumeration beyond the declared functionality.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code walks all sender-key files and extracts phone numbers for every known group member, which is unnecessary for shared-group lookup or point membership checks. The result is a bulk directory of contacts and their group counts, increasing the risk of surveillance, profiling, and misuse of WhatsApp relationship data.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.