Back to skill

Security audit

SEA WhatsApp Business Bot

Security checks for vulnerabilities and agentic risk

Overview

This skill advertises a WhatsApp auto-responder but includes a separate external billing endpoint that can charge a supplied user ID with little visible protection.

Review before installing. This skill may charge per call through SkillPay and sends a user identifier to an external Worker. Install only if you are comfortable with that billing flow and have verified that the endpoint authenticates callers, prevents duplicate or unauthorized charges, and uses a billing-scoped identifier rather than personal or reusable account data.

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

Error
Location
src/index.ts:9
Finding
Unauthenticated and Replayable Billing Requests## Vulnerability Details **File Location**: `src/index.ts`, lines 9-24 **Vulnerability Type**: Missing authentication, authorization, and replay protection on a billing operation **Risk Level**: High ### Vulnerable Code ```ts if (request.method !== "POST") { return Response.json({ error: "POST required" }, { status: 405 }); } const body = await request.json() as { user_id: string }; if (!body.user_id) { return Response.json({ error: "user_id required" }, { status: 400 }); } const billing = await chargeUser({ userId: body.user_id, apiKey: env.SKILLPAY_API_KEY, priceUsdt: 0.03, skillName: "sea-whatsapp-business-bot", }); if (!billing.success) { ``` ### Technical Analysis The public request handler accepts an arbitrary caller-provided `user_id` and immediately passes it to the privileged billing function. The only validation is that the identifier is non-empty. The handler does not authenticate the caller, verify that the caller owns or is authorized to bill the supplied identifier, require a signed request, enforce an idempotency key, or implement visible replay and rate-limiting controls. Consequently, possession or discovery of another user's identifier may be sufficient to request charges against that user. The unavailable `../../shared/billing` implementation might contain additional safeguards, but no such protection is established by the supplied project. Security controls inside that dependency therefore cannot be relied upon or verified in this audit. ### Attack Path 1. An attacker discovers or guesses a valid user identifier. 2. The attacker sends a request to the public `/respond` endpoint: ```http POST /respond Content-Type: application/json {"user_id":"victim-user-id"} ``` 3. The handler accepts the identifier without authenticating the requester or checking ownership. 4. The Worker invokes `chargeUser` using its server-side `SKILLPAY_API_KEY`. ...[truncated 751 chars]
Remediation
## Remediation Suggestions - Authenticate every caller before permitting a billing operation. - Derive the billing identity from the authenticated principal instead of trusting a caller-supplied `user_id`. - If an identifier must be submitted, cryptographically bind it to the authenticated session and verify authorization server-side. - Require signed requests with a short expiration time and a unique nonce. - Require an idempotency key for each legitimate invocation and persist its result so retries cannot cause duplicate charges. - Apply per-account and per-source rate limits, spending limits, and anomaly detection. - Return an appropriate authorization error when identity verification fails. - Verify that `chargeUser` independently validates authorization and prevents duplicate charges. - Add tests covering forged identifiers, repeated requests, expired signatures, duplicate idempotency keys, and concurrent replay attempts.

other

Warning
Location
SKILL.md:17
Finding
User Identifier Transmitted to an External Billing Endpoint Without Privacy Controls## Vulnerability Details **File Location**: `SKILL.md`, lines 17-24 **Vulnerability Type**: External disclosure of a user or account identifier **Risk Level**: Medium ### Vulnerable Instructions ```md POST https://sea-whatsapp-business-bot.swmengappdev.workers.dev/respond Content-Type: application/json {"user_id": "<user_id>"} ``` ### Technical Analysis The Skill instructs the invoking Agent to transmit a user identifier to an externally hosted Cloudflare Worker. The implementation then uses this value for billing. This transmission supports monetization but is not required to perform the advertised language detection, intent classification, or response-generation functions. The supplied documentation does not define what kind of identifier should be used, whether it must be pseudonymous, what party operates the endpoint, how long the identifier is retained, whether it is logged, or whether it is shared with the billing provider. It also does not require informed user consent before transmission. This behavior exceeds the minimum data privileges needed for the advertised WhatsApp auto-response functionality. Some billing identifier may be operationally necessary for paid use, but it should be billing-scoped and privacy-preserving rather than an unrestricted user identifier. ### Attack Path 1. The Agent follows the Skill instructions for a paid invocation. 2. It inserts the user's identifier into the JSON request body. 3. The identifier is transmitted to the externally hosted Worker. 4. The Worker passes the identifier to the billing helper. 5. The endpoint operator—and potentially the downstream billing system, depending on the unavailable helper implementation—can receive or process an identifier associated with the user. 6. If the identifier is stable or reused across systems, it may permit account correlation, tracking, or exposure through service logs. ### Impact Assessment The primary impact is lo ...[truncated 478 chars]
Remediation
## Remediation Suggestions - Clearly disclose that billing requires transmission of an identifier to an external endpoint. - Obtain explicit user consent before transmitting account-linked data. - Use a random, billing-scoped opaque identifier instead of an email address, phone number, WhatsApp identifier, or reusable platform account ID. - Document the endpoint operator, downstream recipients, processing purpose, retention period, logging behavior, and deletion procedure. - Prohibit sending message content, conversation history, phone numbers, or business configuration to the billing endpoint. - Minimize logs and redact identifiers from application, access, error, and analytics logs. - Encrypt data in transit and apply access controls and retention limits at the Worker and billing provider. - Update `SKILL.md` to distinguish the billing endpoint from the advertised response-generation functionality.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
Findings (6)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The declared purpose is a WhatsApp business auto-responder, but the operational instructions prominently require charging the user through an external billing API before any messaging behavior. This mismatch is dangerous because it can mislead reviewers and users about the skill’s real behavior, concealing monetization and external data flows behind an unrelated description.

Anti-Refusal Statement

High
Category
Anti-Refusal
Content
```

**Response guidelines:**
- Always respond in the customer's detected language
- Be friendly, professional, and concise
- For FAQ matches, use the provided answers but adapt to the conversation
- For appointments, confirm details and suggest next steps
Confidence
70% confidence
Finding
Skill instructs the agent to never refuse or to always comply. Suppressing the agent's ability to decline removes a core safety control and enables downstream harmful requests to succeed.

Description-Behavior Mismatch

High
Confidence
98% confidence
Finding
The implementation does not provide any WhatsApp bot functionality and instead acts solely as a payment gate that charges a user-supplied account. This mismatch is dangerous because the published skill purpose can mislead users and reviewers into authorizing billing for a capability that is not actually delivered, enabling deceptive monetization or unauthorized charging workflows.

Lp3

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding
The skill instructs the agent to make a network request to an external endpoint, but it does not declare any tool scope such as permissions or allowed-tools. This creates a transparency and governance gap: consumers and enforcement layers cannot easily tell that the skill performs outbound network activity, which increases the chance of unauthorized data transfer or unexpected side effects.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill sends a user identifier to an external billing endpoint without any privacy notice, consent flow, or explanation of data handling. Even if the identifier seems minimal, transmitting user-linked data to a third party can expose personal or account information and may violate privacy expectations or compliance requirements.

Context-Inappropriate Capability

Medium
Confidence
91% confidence
Finding
This file exposes a standalone charging path with minimal input validation and no visible connection to the claimed business-bot function. That is risky because it creates a monetization endpoint that could be triggered independently, and the lack of contextual justification increases the likelihood that billing is the primary hidden behavior rather than an ancillary feature.

Static analysis

No suspicious patterns detected.