Back to skill

Security audit

Cold Email Outreach

Security checks for vulnerabilities and agentic risk

Overview

This skill is not clearly malicious, but it enables cold-email automation with overstated capabilities, weak guardrails, and a sending bug that could cause unintended emails.

Review carefully before installing. This skill can send real cold emails through your Resend account and process recipient contact data, while some advertised pipeline features are not actually present. Use dry-run first, avoid --limit 0 as a stop control, confirm you have a lawful basis for every contact, and provide working unsubscribe, bounce handling, and retention controls yourself.

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/send-campaign.js:104
Finding
Explicit zero send limit defaults to 25 outgoing emails<![CDATA[ ## Vulnerability Details **File Location**: `scripts/send-campaign.js`, lines 26 and 104 **Vulnerability Type**: Improper numeric input validation and unsafe fallback behavior **Risk Level**: Medium ### Vulnerable Code ```js if (process.argv[i] === '--limit') args.limit = parseInt(process.argv[++i]); ``` ```js const limit = Math.min(args.limit || RATE_LIMIT, RATE_LIMIT); ``` ### Technical Analysis The command-line value supplied through `--limit` is parsed without validating that it is a finite, non-negative integer. The resulting value is then evaluated using the logical OR operator: ```js args.limit || RATE_LIMIT ``` A legitimate value of `0` is falsy in JavaScript, so `--limit 0` is replaced with the default `RATE_LIMIT` value of 25. This reverses the likely operator intent: instead of sending no messages, the program can send up to 25 messages. Other malformed values are also handled inconsistently. For example, `parseInt()` can produce `NaN` or accept partially numeric strings without rejecting the complete input. ### Attack Path 1. An operator or automation system invokes the campaign sender with a real lead list, template, Resend API key, and `--limit 0`, intending to disable delivery: ```bash node scripts/send-campaign.js \ --list leads.csv \ --template intro.txt \ --from "hello@example.com" \ --limit 0 ``` 2. `parseInt("0")` assigns the numeric value `0` to `args.limit`. 3. The expression `args.limit || RATE_LIMIT` evaluates to `RATE_LIMIT` because zero is falsy. 4. The effective limit becomes 25. 5. Unless `--dry-run` is also present, the script sends real email through the Resend API. ### Impact Assessment No additional operating-system privileges are obtained. The impact is confined to the campaign sender and its authorized Resend account, but it can cause up to 25 unintended emails per execution. Consequences can include unauthorized outreach, consumption of API quota, sender-domain reputation damag ...[truncated 63 chars]
Remediation
<![CDATA[ ## Remediation Suggestions Distinguish an omitted limit from an explicitly supplied zero and validate the entire input: ```js if (process.argv[i] === '--limit') { const rawLimit = process.argv[++i]; if (!/^\d+$/.test(rawLimit)) { throw new Error('--limit must be a non-negative integer'); } args.limit = Number(rawLimit); } ``` Then apply the default only when the argument is absent: ```js const requestedLimit = args.limit === undefined ? RATE_LIMIT : args.limit; if (!Number.isSafeInteger(requestedLimit) || requestedLimit < 0 || requestedLimit > RATE_LIMIT) { throw new Error(`--limit must be between 0 and ${RATE_LIMIT}`); } const limit = requestedLimit; ``` Additional hardening should include automated tests for omitted, zero, negative, nonnumeric, fractional, and excessively large values. A zero limit should exit without contacting the Resend API. ]]>

T09 · Insecure Skill Coding Practices

Note
Location
scripts/send-campaign.js:56
Finding
Untrusted CSV headers are compiled into regular expressions<![CDATA[ ## Vulnerability Details **File Location**: `scripts/send-campaign.js`, lines 38–45 and 56–61 **Vulnerability Type**: Regular-expression injection and unhandled input-driven exception **Risk Level**: Low ### Vulnerable Code ```js function parseCSV(filePath) { const lines = fs.readFileSync(filePath, 'utf8').trim().split('\n'); const headers = lines[0].split(',').map(h => h.trim()); return lines.slice(1).map(line => { const values = line.split(',').map(v => v.trim()); const obj = {}; headers.forEach((h, i) => obj[h] = values[i] || ''); return obj; }); } ``` ```js function fillTemplate(template, vars) { let text = template; for (const [key, value] of Object.entries(vars)) { text = text.replace(new RegExp(`\\{${key}\\}`, 'g'), value || ''); } return text; } ``` ### Technical Analysis CSV column names are accepted without validation and become property names in each lead object. During template expansion, every property name is interpolated directly into a dynamically constructed regular expression. Regular-expression metacharacters in a CSV header are therefore interpreted as syntax rather than literal characters. A malformed header can generate an invalid expression and throw a `SyntaxError`. A syntactically valid but specially constructed header can also alter which placeholders are matched, causing unexpected substitutions. The top-level error handler terminates the process after such an exception: ```js main().catch(e => { console.error('Campaign error:', e.message); process.exit(1); }); ``` Although this prevents arbitrary code execution, it allows a supplied lead file to disrupt campaign processing. ### Attack Path 1. An attacker, upstream lead provider, or malformed export supplies a CSV accepted as the campaign lead list. 2. The CSV contains a regex metacharacter in a header, such as: ```csv email,[,first_name victim@example.com,value,Alice ``` 3. `parseCSV()` stores `[` as an object key. 4 ...[truncated 789 chars]
Remediation
<![CDATA[ ## Remediation Suggestions Enforce the documented CSV schema before constructing lead objects: ```js const ALLOWED_HEADERS = new Set([ 'email', 'first_name', 'business_name', 'city', 'industry', 'specific_issue' ]); for (const header of headers) { if (!ALLOWED_HEADERS.has(header)) { throw new Error(`Unsupported CSV header: ${header}`); } } ``` Avoid dynamic regular expressions where possible. Exact placeholder replacement can be implemented with `split()` and `join()`: ```js function fillTemplate(template, vars) { let text = template; for (const [key, value] of Object.entries(vars)) { text = text.split(`{${key}}`).join(String(value || '')); } return text; } ``` If regular expressions remain necessary, escape every key before constructing the expression: ```js function escapeRegExp(value) { return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); } ``` The script should also validate the entire CSV and render all messages before sending the first email. This fail-closed preprocessing step prevents malformed input from causing partial campaign delivery. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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
95% confidence
Finding
The skill advertises a broad automated outreach pipeline including scraping, enrichment, drip sequencing, tracking, and deliverability management, but the described implementation does not actually provide those controls. This mismatch is dangerous because users may rely on nonexistent safeguards or assume compliant handling of prospect data, resulting in privacy, spam, or operational abuse risks.

Missing User Warnings

High
Confidence
95% confidence
Finding
The markdown promotes scraping leads, enriching contact details, and sending automated cold emails, but it omits a clear warning about privacy, consent, legal restrictions, and data-handling obligations. This is especially dangerous in a cold-outreach skill because it normalizes collection and use of personal/business contact data without guardrails, increasing the risk of privacy violations, unlawful processing, and spam abuse.

Lp3

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding
The skill declares access to an environment variable (`RESEND_API_KEY`) but does not define an explicit tool or permission scope. In agent environments, missing scope declarations can cause overbroad execution privileges or unclear secret access boundaries, making it easier for a skill to access sensitive data without transparent user consent.

Vague Triggers

Medium
Confidence
96% confidence
Finding
The skill uses broad trigger language such as general outreach, prospecting, and campaign setup, which increases the chance it will be invoked for loosely related requests without meaningful user intent verification. In this context, that is risky because the skill can facilitate scraping, contact enrichment, and bulk cold-email activity that may carry legal, privacy, and anti-spam consequences.

External Transmission

Medium
Category
Data Exfiltration
Content
### 4. Verify in Resend
```bash
curl -X POST https://api.resend.com/domains \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "yourdomain.com"}'
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
### 4. Verify in Resend
```bash
curl -X POST https://api.resend.com/domains \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "yourdomain.com"}'
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Static analysis

No suspicious patterns detected.