Back to skill

Security audit

meta-ads-copywriter

Security checks for vulnerabilities and agentic risk

Overview

The skill is openly for Meta Ads creation, but it gives an agent live ad-publishing and update authority through a third-party gateway without enough scoping, confirmation, or data-handling detail.

Install only if you intend to let an agent work with live Meta Ads assets through Habilis. Use least-privilege, account-limited, short-lived tokens; confirm every upload, creative creation, or ad update manually; and clarify gateway logging, retention, token handling, and spend safeguards before using production accounts.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:22
Finding
Privileged Meta Ads Operations Delegated to a Third-Party MCP Gateway Without Documented Access Controls<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:22-44`, `SKILL.md:77`, and corroborating configuration in `README.md:22-39` and `README.md:51-68` **Vulnerability Type**: Excessive third-party trust and insufficiently documented least-privilege controls **Risk Level**: Medium ### Vulnerable Code ```bash export HABILIS_API_KEY="hab_live_..." export META_ACCESS_TOKEN="EAA..." # Token do anunciante na ponta export META_AD_ACCOUNT_ID="act_..." ``` ```yaml mcp_servers: habilis: url: "https://xvix.com.br/api/mcp" headers: Authorization: "Bearer ${HABILIS_API_KEY}" ``` ```text - `mcp__meta_ads__upload_image`: Faz upload de imagens e criativos renderizados para a biblioteca da conta. - `mcp__meta_ads__create_ad_creative`: Registra criativos dinâmicos ou de imagem única com headline, copy e CTA. - `mcp__meta_ads__update_ad`: Atualiza o criativo de anúncios existentes ou substitui variações pausadas. ``` ```text 4. **Publicação via MCP:** Invoca `mcp__meta_ads__create_ad_creative` através do gateway Habilis (`https://xvix.com.br/api/mcp`) para subir o criativo aprovado. ``` ### Technical Analysis The Skill instructs users to configure sensitive Meta advertising credentials and connect the agent to the third-party Habilis MCP endpoint. The MCP tool surface includes state-changing operations that can upload assets, create advertising creatives, and update existing advertisements. These operations are consistent with the Skill's advertised purpose, but the package does not document or enforce: - Short-lived or narrowly scoped Meta access tokens. - Restriction of operations to a specific advertising account. - A mandatory human-approval control before each create or update operation. - Restrictions preventing unexpected MCP tools or parameters from being used. - Gateway credential-storage, forwarding, logging, and retention behavior. - Request signing, server pinning, or other controls beyond HTTPS and bearer authentication. - Advertisi ...[truncated 2213 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Use short-lived Meta access tokens with only the permissions required to upload and manage creatives. 2. Restrict credentials to explicitly approved advertising accounts and avoid organization-wide or administrator-level tokens. 3. Require an explicit human confirmation immediately before every upload, create, or update operation, displaying the target account, advertisement, creative content, destination URL, and parameters. 4. Enforce an allowlist of permitted MCP tools and reject undeclared or unexpected tool calls returned by the gateway. 5. Validate all MCP arguments locally, including account identifiers, advertisement identifiers, URLs, CTA values, and uploaded asset types. 6. Prefer direct use of Meta's official API where practical, reducing the number of entities that receive or exercise privileged access. 7. Document whether Meta tokens are transmitted to, processed by, logged by, or retained by the Habilis gateway. Support any “Zero Storage” claim with a verifiable policy and technical controls. 8. Rotate Habilis and Meta credentials regularly, revoke them immediately after suspected exposure, and prevent credentials from appearing in logs or agent output. 9. Enable Meta account alerts, audit logging, role separation, spending limits, and campaign-level safeguards. 10. Document the gateway's security and incident-response model, including tenant isolation, request authentication, retention periods, and credential compromise procedures. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (6)

Credential Access

High
Category
Privilege Escalation
Content
### 🚀 Quick Onboarding & First-Time Setup
1. **Get your Habilis MCP Token**:
   - Access the developer portal at [https://xvix.com.br](https://xvix.com.br) to generate your access token.
2. **Configure Environment Variables**:
   ```bash
   export HABILIS_API_KEY="hab_live_..."
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The README explicitly says the skill can autonomously generate and publish ad variations to Meta Ads, but it does not clearly warn that using the skill can perform live account-changing actions with financial and operational consequences. In an agent-skill context, missing this warning increases the chance of unintended ad creation or modification by users or autonomous agents acting without sufficient confirmation.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The README instructs users to configure credentials and connect to a remote MCP gateway, but it does not disclose what data may be transmitted to that third-party service, how credentials are scoped, or what privacy/security guarantees apply. In a marketing-copy skill, user prompts, ad content, tracking parameters, and account metadata may be sensitive business data, so omission of transmission and privacy warnings is security-relevant.

Vague Triggers

Medium
Confidence
96% confidence
Finding
The trigger list contains broad terms such as 'copywriter' and 'gerar criativo' that are likely to match ordinary writing or marketing requests, causing this skill to activate outside a clearly scoped Meta Ads context. Because the skill can publish or update live ad creatives through MCP tools, accidental invocation can lead to unintended ad modifications or external API actions.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The skill advertises copywriting and creative generation but does not clearly warn that it can also upload images, create ad creatives, and update existing live ads. This missing disclosure is dangerous because users may invoke what appears to be a content-generation skill without realizing it can perform state-changing actions against production advertising accounts.

Natural-Language Policy Violations

Low
Confidence
79% confidence
Finding
The natural-language instructions, triggers, and operational guidance are entirely in Portuguese, and the skill does not state that users may choose another language or locale. If organizational policy requires language choice or opt-in, this is a locale/language constraint presented without user selection.

Static analysis

No suspicious patterns detected.