Back to skill

Security audit

Whatsapp Business 1.0.3

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent WhatsApp Business integration, but it gives live messaging, deletion, and credential-handling examples without enough safeguards for production accounts.

Install only for authorized WhatsApp Business accounts and use it with explicit human approval for live sends, template/profile changes, media deletion, and connection deletion. Do not print or share MATON_API_KEY; verify only that it is set, keep logs redacted, and rotate the key if it has already appeared in terminal output or support materials.

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 (1)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:599
Finding

API Key Disclosed Through Terminal Output

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:599-605
Vulnerability Type: Sensitive credential exposure
Risk Level: Medium

Vulnerable Code:

markdown
### Troubleshooting: API Key Issues

1. Check that the `MATON_API_KEY` environment variable is set:

```bash
echo $MATON_API_KEY
text

### Technical Analysis

The troubleshooting command prints the complete `MATON_API_KEY` bearer credential to standard output. Although this does not directly transmit the key over the network, terminal output is frequently retained in CI/CD logs, shell transcripts, support records, screen recordings, agent conversation histories, or shared screenshots.

Possession of the key may allow an unauthorized party to authenticate to the documented Maton control and gateway endpoints. This disclosure is unnecessary because troubleshooting only needs to determine whether the variable is present, not reveal its value.

The other documented uses of the key send it through an HTTPS `Authorization` header to `gateway.maton.ai` or `ctrl.maton.ai`. That network behavior is disclosed and necessary for the Skill's managed OAuth proxy functionality. No evidence was found that the credential is sent to an unrelated endpoint.

### Attack Path

1. An operator encounters an authentication problem and follows the documented troubleshooting procedure.
2. The operator runs `echo $MATON_API_KEY`.
3. The complete bearer key appears in terminal output.
4. The output is retained in a CI log, agent transcript, screen recording, screenshot, or support ticket.
5. An attacker or unauthorized viewer obtains the retained output and extracts the key.
6. The attacker supplies the key in an `Authorization: Bearer` header to Maton endpoints.
7. Subject to the key's server-side permissions and connected accounts, the attacker can access WhatsApp Business operations or connection-management functions.

### Impact Assessment

A leaked key could per
...[truncated 655 chars]
Remediation
View remediation

Remediation Suggestions

Replace the secret-printing command with a presence check that never displays the credential:

bash
if [ -n "${MATON_API_KEY:-}" ]; then
  echo "MATON_API_KEY is set"
else
  echo "MATON_API_KEY is not set"
fi

Additional hardening measures:

  • Never print, log, or include the full API key in diagnostics, support tickets, screenshots, or error messages.
  • If partial identification is necessary, use a provider-issued non-secret key identifier rather than exposing any portion of the bearer token.
  • Redact Authorization headers in HTTP debugging, CI logs, and agent transcripts.
  • Rotate the key immediately if it has already appeared in retained output.
  • Use narrowly scoped, revocable credentials where supported.
  • Document key revocation and incident-response procedures.
  • Ensure network requests continue to use HTTPS and restrict credential transmission to the intended Maton domains.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (11)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · SKILL.md (reported line 398)May include surrounding context.

Delete Media

bash
DELETE /whatsapp-business/v21.0/{media_id}

Message Templates

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · SKILL.md (reported line 446)May include surrounding context.

Delete Template

bash
DELETE /whatsapp-business/v21.0/{whatsapp_business_account_id}/message_templates?name=template_name

Phone Numbers

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill is explicitly designed to send WhatsApp messages and related customer data to external services (gateway.maton.ai and upstream Meta/WhatsApp APIs), but it does not prominently warn about privacy, consent, or third-party data transmission implications. In an agent setting, this can lead to users or operators sending personal data, message contents, phone numbers, media, or business metadata off-platform without clear acknowledgement.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documentation includes destructive operations such as deleting connections, media, and templates without clearly warning that these actions may be irreversible or service-impacting. In an agent workflow, a model or user may invoke deletion endpoints without understanding the operational consequences, causing loss of access, assets, or production templates.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
84% confidence
Finding

The JavaScript example uses fetch to send WhatsApp message payloads to an external gateway, which can include personal data and business communications. Because the skill is aimed at operational messaging, the context makes unintended external transmission plausible unless the docs clearly require consent and review.

Content

Scanner excerpt · SKILL.md (reported line 499)May include surrounding context.

md
};

// Send text message
await fetch(
  'https://gateway.maton.ai/whatsapp-business/v21.0/PHONE_NUMBER_ID/messages',
  {
    method: 'POST',

External Transmission

Medium
Category
Data Exfiltration
Confidence
84% confidence
Finding

This fetch example transmits a template message request externally and can trigger real customer-facing communications. In an agent skill, that creates a meaningful risk of accidental outreach or privacy-impacting disclosure when examples are copied without review.

Content

Scanner excerpt · SKILL.md (reported line 514)May include surrounding context.

md
);

// Send template message
await fetch(
  'https://gateway.maton.ai/whatsapp-business/v21.0/PHONE_NUMBER_ID/messages',
  {
    method: 'POST',

External Transmission

Medium
Category
Data Exfiltration
Confidence
84% confidence
Finding

The Python example at this location demonstrates live network transmission to a third-party gateway using bearer authentication and customer-directed payloads. In an autonomous or semi-autonomous agent context, such examples can normalize sending potentially sensitive data without emphasizing review, consent, or minimization.

Content

Scanner excerpt · SKILL.md (reported line 544)May include surrounding context.

md
}

# Send text message
response = requests.post(
    'https://gateway.maton.ai/whatsapp-business/v21.0/PHONE_NUMBER_ID/messages',
    headers=headers,
    json={

External Transmission

Medium
Category
Data Exfiltration
Confidence
84% confidence
Finding

The Python example at this location demonstrates live network transmission to a third-party gateway using bearer authentication and customer-directed payloads. In an autonomous or semi-autonomous agent context, such examples can normalize sending potentially sensitive data without emphasizing review, consent, or minimization.

Content

Scanner excerpt · SKILL.md (reported line 544)May include surrounding context.

md
}

# Send text message
response = requests.post(
    'https://gateway.maton.ai/whatsapp-business/v21.0/PHONE_NUMBER_ID/messages',
    headers=headers,
    json={

External Transmission

Medium
Category
Data Exfiltration
Confidence
84% confidence
Finding

This second Python example also performs a live outbound message send to an external service. The main risk is not the existence of network access itself, but that the skill presents it without sufficient safeguards against sending user/customer data to third parties unintentionally.

Content

Scanner excerpt · SKILL.md (reported line 556)May include surrounding context.

md
)

# Send template message
response = requests.post(
    'https://gateway.maton.ai/whatsapp-business/v21.0/PHONE_NUMBER_ID/messages',
    headers=headers,
    json={

External Transmission

Medium
Category
Data Exfiltration
Confidence
84% confidence
Finding

This second Python example also performs a live outbound message send to an external service. The main risk is not the existence of network access itself, but that the skill presents it without sufficient safeguards against sending user/customer data to third parties unintentionally.

Content

Scanner excerpt · SKILL.md (reported line 556)May include surrounding context.

md
)

# Send template message
response = requests.post(
    'https://gateway.maton.ai/whatsapp-business/v21.0/PHONE_NUMBER_ID/messages',
    headers=headers,
    json={

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The skill's natural-language examples consistently force an English US locale in template payloads, and the document does not indicate that this is merely an example or that users should choose a locale appropriate to their audience. Under the language/locale policy, skills should not impose a specific language/locale without opt-in or justification.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.exposed_resource_identifier

Example code exposes a concrete connection_id instead of a placeholder.

Critical
Code
suspicious.exposed_resource_identifier
Location
SKILL.md:105