Back to skill

Security audit

Email Triage

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent email-triage automation, but it needs review because it can process broad mailbox content, alter message read state, save sensitive reports locally, and send email-derived summaries to messaging channels without clear safeguards.

Review before installing. Use only with a read-only Microsoft mail scope unless the unread-state restoration is explicitly required and logged. Disable automatic WeCom/WeChat pushing until the recipient, channel, and redaction rules are clear. Treat generated desktop reports as sensitive email copies, and require HTML escaping plus prompt-injection isolation before processing external mail content.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/execution-prompt.md:24
Finding

Untrusted Email Content Is Processed Without Prompt-Injection Isolation

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/template.html:66
Finding

Email-Derived Values Can Be Inserted into the Dashboard Without HTML Escaping

Content
View full analysis
{{T0_SECTION}} {{T1_SECTION}} {{T2_SECTION}} {{T3_SECTION}} ``` The resulting document contains executable JavaScript: ```html ``` ### Technical Analysis Sender display names, sender addresses, subjects, and body-derived summaries ultimately originate from incoming email and are therefore attacker-controlled or attacker-influenced. The instructions do not require context-sensitive HTML escaping or sanitization before these values are inserted into `T0_SECTION`, `T1_SECTION`, `T2_SECTION`, or `T3_SECTION`. Because each section placeholder represents raw markup rather than a text-only slot, string concatenation can allow a crafted value to terminate its intended element and introduce new HTML. Depending on browser behavior and the generated markup, the injected content may include deceptive links, forms, images, event-handler attributes, or scripts. The local-file origin limits some browser capabilities, but it does not make unescaped HTML safe. Injected content can still falsify the report, direct the user to attacker-controlled resources, and potentially execute script within the opened document. ### Attack Path 1. An attacker sends an ...[truncated 1339 chars]
Remediation
View remediation
`, `"`, and `'`. 2. Do not generate email cards through raw string concatenation. Build elements using DOM APIs and assign untrusted values through `textContent`. 3. If server-side or Agent-side templating is retained, use a template engine with automatic escaping enabled by default. 4. Sanitize any deliberately supported markup with a strict allowlist. Do not allow scripts, event-handler attributes, forms, iframes, remote images, or unsafe URL schemes. 5. Add a restrictive Content Security Policy. For example, default to local resources only, prohibit plugins and frames, and authorize the required local script with a nonce or hash rather than allowing arbitrary inline scripts. 6. Validate generated section markup before writing the report and fail closed if unsafe tags or attributes are found. 7. Treat LLM-generated summaries as untrusted output and escape them in the same way as original email fields. 8. Add tests with subjects and sender names containing closing tags, image error handlers, script tags, malicious links, and encoded HTML entities. ]]>

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/execution-prompt.md:87
Finding

Read-Only Email Triage Workflow Requests Unnecessary Mailbox Write Capability

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (11)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill sends email-derived summaries to WeCom/WeChat but does not prominently warn users that mailbox content may leave the email system and be transmitted to external messaging channels. This is dangerous because even short summaries can expose sensitive business, financial, legal, or personal information into different retention, access-control, and compliance domains.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

该指令要求代理在检测到邮件被标记为已读后,主动通过 PATCH 将其改回未读。这超出了“整理、分级、生成看板”的必要权限范围,并会对用户邮箱状态进行隐式写操作,可能干扰正常工作流、审计预期或与其他客户端的操作冲突。

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

该技能指示把基于邮件内容生成的简报通过企微或微信发送,属于将邮箱信息转发到外部消息渠道,但未要求用户确认、数据脱敏或校验接收对象。若摘要包含敏感业务、客户、财务或合规信息,可能造成未经授权的跨系统传播和持久留存。

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

文档一方面要求不要修改邮件已读状态,另一方面又要求在步骤 4 中把已变为已读的邮件改回未读,存在直接矛盾。此类矛盾的执行规范会导致代理实现者误用写权限,增加不可预测的邮箱状态修改风险,也削弱了用户对技能行为边界的理解。

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger phrases are broad enough to match common requests such as '整理邮件' or '跑一下邮件日报', increasing the chance of accidental invocation. In this skill, accidental execution is more dangerous than usual because it performs large-scale mailbox analysis and may generate downstream external summaries without a narrowly scoped user request.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill does not clearly warn users that it may modify mailbox state by changing messages back to unread. In the context of email processing, even 'repair' writes can disrupt workflows, unread counters, downstream automations, and audit expectations, making the omission security-relevant rather than merely cosmetic.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill claims it only performs read-only mail access, but it explicitly includes logic to PATCH mailbox state by setting messages back to unread. This is dangerous because it grants and normalizes write-side behavior against user mailboxes, creating risk of unintended state changes, audit inconsistency, and user deception about what the automation can modify.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The wording 'never proactively PATCH isRead=true' is immediately followed by a different PATCH operation, which creates an intent-level contradiction and can mislead reviewers or users into believing the skill is read-only. Ambiguity around write actions is dangerous in mailbox automations because users may grant permissions without understanding that message state can still be altered.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

技能要求将包含发件人、主题、摘要、时间等邮件元数据的 HTML 报告保存到桌面,本质上是在本地创建新的敏感信息副本,但没有任何用户提示、保留策略或访问控制说明。桌面通常更易被本机其他用户、备份系统、同步工具或截屏软件暴露,从而扩大邮件信息泄露面。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The instruction '全程使用中文' mandates a single language for all operation and output. This is a natural-language locale policy constraint, and the file does not present it as user-selectable or justify it as a region-specific requirement.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The HTML template declares lang="zh-CN" and all visible UI text is written in Chinese, which imposes a specific language/locale on all users. There is no natural-language indication that the locale is optional, configurable, or limited to a justified region-specific use case.

Content

No source excerpt is available for this finding.