Back to skill

Security audit

Email Tool

Security checks for vulnerabilities and agentic risk

Overview

This email skill is coherent with its stated purpose, but it can send email and read mailbox contents using account credentials without built-in approval or scoping safeguards.

Review this before installing. Only use it with an email account you are comfortable exposing to the agent, require manual review of recipients and message bodies before sending, avoid sensitive mailbox searches unless needed, leave markRead disabled unless explicitly intended, and update the vulnerable dependencies before production use.

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
scripts/secret-scan.js:55
Finding

Secret Scanner Discloses Detected Credentials in Logs

Content
View full analysis
{ for (const re of PATTERNS) { if (re.test(line)) { hits.push({ file: rel, line: i + 1, text: line.trim().slice(0, 200) }); } } }); if (hits.length) { console.error('Potential secrets detected. Refusing to proceed.'); for (const h of hits.slice(0, 50)) { console.error(`- ${h.file}:${h.line} :: ${h.text}`); } process.exit(2); } ``` ### Technical Analysis The scanner is intended to prevent accidental publication of credentials, but it retains up to 200 characters from every matching source line and writes that content to standard error. If a match contains a real password, API key, token, or private-key material, the scanner reproduces the sensitive value in terminal output. Standard error is commonly retained by CI/CD systems, packaging services, shell transcripts, and centralized log collectors. Consequently, a secret that was initially limited to a source file can be propagated to additional systems and users with log-reading access. The scanner therefore increases the exposure scope of the exact information it is designed to protect. The finding is limited to sensitive-data disclosure. The code does not itself provide command execution, privilege escalation, persistence, or covert network exfiltration. ### Attack Path 1. A developer accidentally places a credential in a project file using syntax matched by one of the scanner's regular expressions. 2. The developer or an automated packaging pipeline runs `node scripts/secret-scan.js`, as recommended by `SKILL.md`. 3. The scanner captures the matching line, including up to 200 characters of its content. 4. The scanner prints that line to standard error. 5. A terminal recorder, CI/CD platform, build service, or centralized loggin ...[truncated 775 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (14)

Known Vulnerable Dependency: nodemailer==6.10.1 — 12 advisory(ies): CVE-2026-82661 (Nodemailer: CRLF injection in Nodemailer List-* header comments allows arbitrary); GHSA-2x7j-588g-ccc2 (Nodemailer: Quadratic (O(n²)) time complexity in addressparser allows remote den); GHSA-8m3c-c648-2xjj (Nodemailer: resolveContent() on a MailMessage bypasses disableFileAccess/disable) +9 more

High
Category
Supply Chain
Confidence
97% confidence
Finding

The lockfile pins nodemailer to 6.10.1, and the provided advisory list indicates multiple known issues affecting that version, including header injection, content resolution bypasses, and denial-of-service conditions. In an email-handling skill, a vulnerable mail library is especially relevant because attacker-controlled addresses, headers, message bodies, or attachments are common inputs and may directly reach the affected code paths.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: semver==5.3.0 — 1 advisory(ies): CVE-2022-25883 (semver vulnerable to Regular Expression Denial of Service)

High
Category
Supply Chain
Confidence
89% confidence
Finding

The lockfile includes semver 5.3.0, which is flagged for a known ReDoS vulnerability. Although this package appears to be a transitive dependency under utf7 rather than a primary mail-processing component, any path that evaluates attacker-influenced version strings could cause excessive CPU consumption and service degradation.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: nodemailer==6.10.1 — 12 advisory(ies): CVE-2026-82661 (Nodemailer: CRLF injection in Nodemailer List-* header comments allows arbitrary); GHSA-2x7j-588g-ccc2 (Nodemailer: Quadratic (O(n²)) time complexity in addressparser allows remote den); GHSA-8m3c-c648-2xjj (Nodemailer: resolveContent() on a MailMessage bypasses disableFileAccess/disable) +9 more

High
Category
Supply Chain
Confidence
97% confidence
Finding

The project includes nodemailer in a version range flagged as resolving to a release with multiple published advisories, including header injection and denial-of-service issues. Because this skill directly exposes email-sending capability, vulnerable mail composition or parsing behavior is especially relevant and could enable message manipulation, abuse of headers, or service disruption depending on how the library is used in code.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest grants outbound email-sending capability but provides no warning that using the skill can transmit data to external recipients. In an AI agent context, this is dangerous because the tool can be used to exfiltrate sensitive information or send unauthorized communications unless the manifest clearly signals the need for explicit user consent and disclosure controls.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/secret-scan.js (reported line 43)May include surrounding context.

js
// quick heuristic
  const ex = path.extname(p).toLowerCase();
  return [
    '.md', '.js', '.ts', '.json', '.yml', '.yaml', '.txt', '.env', '.py', '.ps1', '.sh'
  ].includes(ex);
}

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill exposes email sending capability but does not explicitly warn that message bodies, subjects, and recipient addresses will be transmitted to an external email service. This can lead users or downstream agents to unintentionally exfiltrate sensitive data, especially because email is a high-risk outbound channel and the skill description frames sending as a normal capability without emphasizing privacy or approval requirements.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill manifest exposes high-impact email capabilities using very broad descriptions like 'Send an email' and 'Search for emails' without constraining authorized use cases, data sensitivity, or approval requirements. In an agent setting, vague descriptions increase the chance the agent will invoke these actions in contexts the user did not intend, leading to accidental data disclosure, phishing-like outbound messages, or unauthorized mailbox access.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The email search skill includes an optional 'markRead' parameter that can alter mailbox state, but the manifest does not warn users or the agent about this side effect. This can cause unintended modification of evidence, workflow state, or user-visible unread counts when the agent performs what appears to be a read-only search.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

No manifest is available, so there is no declared purpose that would justify reading credentials from process environment variables and a local secrets file. The code explicitly accesses EMAIL_USER/EMAIL_PASS and OPENCLAW_SECRETS_DIR-derived files to obtain account secrets, which is a sensitive capability beyond a neutral unknown-purpose baseline.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

With no manifest available, there is no declared skill purpose that explains remote email transmission and mailbox access. The code connects to external SMTP and IMAP servers to send messages and retrieve mailbox contents, which is a significant capability that should be explicitly justified by the skill description.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The sendEmail function transmits email immediately using caller-supplied to/cc/bcc/subject/body values without any confirmation, policy check, or recipient validation. In an agent setting, this can cause unintended outbound communication, spam, disclosure of sensitive data, or socially engineered messages being sent on the user's behalf.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The searchEmails function accesses mailbox contents and returns message headers and body excerpts without any disclosure, consent flow, or scope restriction. In an agent environment, this enables silent collection of potentially sensitive email data and can expose private correspondence to downstream tools, logs, or prompts.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
78% confidence
Finding

Using a caret range for nodemailer allows installation of newer compatible releases that may differ from the version originally reviewed, reducing build reproducibility and potentially introducing unreviewed changes. While not an exploit by itself, flexible dependency pinning increases supply-chain risk for a tool that can send external communications.

Content

Scanner excerpt · package.json (reported line 7)May include surrounding context.

json
"description": "Send and read emails via Zoho IMAP/SMTP",
  "main": "src/index.js",
  "dependencies": {
    "nodemailer": "^6.9.8",
    "imap-simple": "^5.1.0"
  },
  "openclaw": {

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
78% confidence
Finding

Using a caret range for imap-simple permits drift to later package versions without explicit review, which weakens supply-chain control and reproducibility. For a mailbox-access skill, even small dependency changes may affect authentication, message parsing, or security behavior.

Content

Scanner excerpt · package.json (reported line 8)May include surrounding context.

json
"main": "src/index.js",
  "dependencies": {
    "nodemailer": "^6.9.8",
    "imap-simple": "^5.1.0"
  },
  "openclaw": {
    "skills": {

Static analysis

No suspicious patterns detected.