Back to skill

Security audit

Email Writer

Security checks for vulnerabilities and agentic risk

Overview

This email-sending skill matches its stated purpose, but it has enough safety gaps around automatic sending, privacy disclosure, and message handling that users should review it carefully before installing.

Install only if you are comfortable letting the agent control a logged-in webmail session. Review recipient, thread, subject, body, and attachments yourself before any send action, avoid sensitive content until the privacy wording is corrected, and prefer a version that uses plain-text insertion plus a final confirmation after the target email is resolved.

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
SKILL.md:120
Finding

Unsanitized Email Content Inserted into Authenticated Webmail Pages as HTML

Content
View full analysis
{ const bodyField = document.querySelector('[role="textbox"][contenteditable="true"]'); if (bodyField) { bodyField.focus(); bodyField.innerHTML = body.replace(/\n/g, '
'); } }, emailBody) ``` The same unsafe sink is used throughout the other composition and reply procedures: ```javascript // Outlook composition bodyField.innerHTML = body.replace(/\n/g, '
'); // QQ Mail composition bodyField.contentDocument.body.innerHTML = body.replace(/\n/g, '
'); bodyField.innerHTML = body.replace(/\n/g, '
'); // 163 Mail composition bodyField.contentDocument.body.innerHTML = body.replace(/\n/g, '
'); bodyField.innerHTML = body.replace(/\n/g, '
'); // Gmail and Outlook replies if (bodyField) bodyField.innerHTML = body.replace(/\n/g, '
'); // QQ Mail and 163 Mail replies if (iframe) iframe.contentDocument.body.innerHTML = body.replace(/\n/g, '
'); ``` ### Technical Analysis The Skill directly assigns generated or user-controlled email content to the DOM `innerHTML` property. Replacing newline characters with `
` does not sanitize the remaining input. Consequently, HTML tags, attributes, remote resources, deceptive formatting, and potentially active browser content are interpreted as markup rather than inserted as plain text. This occurs inside an authenticated webmail page. Depending on the provider's DOM handling, browser security policy, and subsequent provider-side sanitization, crafted input can: - Insert arbitrary HTML into the message composer. - Load attacker-controlled remote resources, such as tracking images. - Create misleading links or visually deceptive me ...[truncated 2156 chars]
Remediation
View remediation
{ const bodyField = document.querySelector( '[role="textbox"][contenteditable="true"]' ); if (bodyField) { bodyField.focus(); bodyField.textContent = body; bodyField.dispatchEvent(new InputEvent('input', { bubbles: true, inputType: 'insertText', data: body })); } }, emailBody); ``` 2. Prefer provider-native typing or input APIs where available so content is entered through the same path as normal user text. 3. If rich HTML email is an explicit requirement, sanitize content using a maintained, strict allowlist before inserting it. At minimum, reject or remove: - `script`, `iframe`, `object`, `embed`, `form`, `style`, and `svg` elements. - All event-handler attributes such as `onclick` and `onerror`. - `javascript:`, `data:`, and other unsafe URL schemes. - Remote images and other externally loaded resources unless separately approved. - CSS capable of hiding, overlaying, or materially misrepresenting content. 4. Do not implement escaping by newline replacement alone. Build line breaks using text nodes and DOM elements, or rely on the editor's normal plain-text input behavior. 5. Present a final rendered preview and require explicit user confirmation immediately before sending. 6. Add tests using payloads such as HTML tags, image resources, event attributes, malformed markup, unsafe links, and bidirectional or hidden text to verify that they are rendered as harmless text. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:264
Finding

Gmail Reply Workflow Can Send Sensitive Content to an Unverified Conversation

Content
View full analysis
{ const bodyField = document.querySelector('[role="textbox"][contenteditable="true"]'); if (bodyField) bodyField.innerHTML = body.replace(/\n/g, '
'); }, replyBody) await browser.click({ selector: '[gh="s"]' }) ``` ``` ### Technical Analysis The Gmail reply procedure clicks `.zA`, a generic selector for Gmail message rows, without constraining the selection to the sender, subject, thread, message identifier, or other user-approved target. If multiple message rows are present, the automation may open whichever matching element the browser selects first. After opening the row, the workflow neither reads nor validates the active conversation. It immediately selects Reply, inserts content, and clicks Send. There is no final check that the resolved recipient and subject correspond to the email the user intended to answer. This creates a confused-target condition in a consequential operation. The initial confirmation requirements elsewhere in the Skill do not resolve this issue because the actual DOM target selected at execution time is not compared with the confirmed details. ### Attack Path 1. The user asks the Agent to reply to a specific Gmail message. 2. The inbox contains multiple elements matching `.zA`. 3. The intended message is not the first element resolved by the generic selector, potentially because inbox ordering changed, a new message arrived, or an attacker sent a message that changed the ordering. 4. The automation opens the wrong conversation. 5. It clicks the generic Reply control without verifying the sender, reci ...[truncated 1117 chars]
Remediation
View remediation
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (4)

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill states that 'no email content is uploaded externally,' but its core behavior is to send recipient, subject, body, and possibly attachments to third-party mail provider servers via browser automation. This misleading privacy claim can cause users to disclose sensitive information under false assumptions, increasing the risk of unintended data exfiltration to external services.

Content

No source excerpt is available for this finding.

Scope Creep

Low
Category
Excessive Agency
Confidence
70% confidence
Finding

Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Content

Scanner excerpt · LICENSE.txt (reported line 12)May include surrounding context.

text
permit persons to whom the Software is furnished to do so.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The safety-critical warnings at the top of the skill are written only in Chinese, while the rest of the document and trigger phrases indicate the skill is intended for both English and Chinese users. This creates a locale/language policy concern because English-speaking users may not understand the disclosures and no explicit language choice or opt-in is offered.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest description and feature lists repeatedly scope provider support to Gmail, Outlook, QQ Mail, and 163 Mail. However, the sample implementation includes detection for 'mail.126.com' and lists 126 Mail as a supported platform, expanding behavior beyond the declared provider set.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.