T05 · Unauthorized Access and Privilege Escalation
- Location
references/index.js:73- Finding
Undeclared outbound email capability exceeds the Skill's stated privileges
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This email connector needs Review because it is presented as read/search-only but also sends email and disables important connection security checks.
Install only after treating it as a send-capable enterprise mailbox connector, not a read-only reader. Before use, remove or explicitly disclose the send_email tool, restore TLS certificate verification, avoid plaintext credential storage where possible, pin dependencies, and rotate any auth code used with the insecure TLS configuration.
references/index.js:73Undeclared outbound email capability exceeds the Skill's stated privileges
references/index.js:23TLS certificate verification is disabled for mailbox connections
SKILL.md:61Mailbox authentication secret is persisted in plaintext MCP configuration
SKILL.md:50Runtime dependencies are installed without version or integrity pinning
references/index.js:147IMAP sequence numbers are mislabeled and reused as stable message UIDs
The skill claims to provide read/search access to email, but the referenced implementation reportedly includes SMTP/send capability and mailbox write/action behavior not disclosed in the description. That mismatch is dangerous because users may authorize the connector believing it is read-only when it may also send mail or perform account-affecting actions.
The skill disables TLS certificate verification and presents it as a normal fix without explaining the security consequences. Omitting that warning materially increases the likelihood that users will deploy an insecure configuration permanently, exposing credentials and email traffic to interception.
The setup directs users to set NODE_TLS_REJECT_UNAUTHORIZED=0, which disables TLS certificate validation for the connector. This allows man-in-the-middle interception of email credentials and message contents, especially dangerous for a service handling mailbox authentication and potentially sensitive corporate email.
The skill metadata says the connector is for connecting exmail to read and search emails, but the tool list also exposes a send_email capability. This creates a material scope mismatch: users or orchestrators may grant access expecting read-only behavior, while the code can perform outbound actions from the mailbox account.
Outbound SMTP sending is implemented even though the stated skill purpose is limited to reading and searching email. In an agent context, unexpected send capability can be abused to exfiltrate data, impersonate the user, spam contacts, or trigger business actions from a trusted corporate mailbox.
The skill instructs the agent to perform networked setup actions and handle environment-stored credentials, yet it declares no explicit tool scope or permission boundaries. This creates unnecessary ambiguity about what the skill is allowed to do and increases the chance of overbroad execution when handling sensitive email configuration.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
The `mcp-email` package on npm is broken for WorkBuddy:
1. **stdout pollution**: Contains `console.log()` calls that write to stdout, corrupting MCP's JSON-RPC protocol over stdio. MCP requires stdout to carry only JSON-RPC messages.
2. **NODE_OPTIONS conflict**: WorkBuddy's runtime sets `NODE_OPTIONS=--use-system-ca` which modern Node.js rejects, killing the process immediately.
3. **Old MCP SDK**: Uses SDK v0.6.1, incompatible with current WorkBuddy's MCP client.
The instructions tell the user to place EMAIL_USER and EMAIL_PASSWORD directly into mcp.json without warning that this stores sensitive credentials in plaintext configuration. Plaintext credential storage increases the risk of accidental disclosure via backups, logs, screenshots, file sharing, or local compromise.
This code accesses sensitive credentials via EMAIL_USER and EMAIL_PASSWORD, but there is no user-facing prompt, warning comment explaining the sensitivity, or other disclosure around credential handling. For code files, access to sensitive environment variables should be disclosed unless clearly warned elsewhere in the skill description.
The getRecentEmails function connects to a remote IMAP server and retrieves message metadata and body text, which involves transmitting user mailbox data over the network. The file lacks a visible disclosure near this operation explaining that mailbox contents will be accessed and returned.
The getEmailContent function retrieves full email contents, including text, HTML, and attachment metadata, from the mail server. There is no explicit warning, prompt, or nearby documentation informing users that sensitive message content will be accessed and exposed through the tool output.
Sending email without explicit warning or user confirmation is dangerous because it performs an external side effect from a trusted mailbox account. In this skill's context, the risk is amplified because the manifest suggests read/search behavior, so users may not expect outbound actions at all.
The searchEmails function queries the IMAP server and returns message metadata and excerpts, which exposes mailbox data through a network-backed operation. There is no explicit comment or user-facing notice warning that the search will access and return email content.
The error message is hardcoded in Chinese, indicating a fixed language choice for user-facing output. Under the language/locale policy, forcing a specific language without user opt-in or documented justification is a natural-language policy concern.
The listed tool descriptions and parameter descriptions are presented only in Chinese, which forces one locale for user-facing metadata. There is no indication that the user can choose another language or that the skill is intentionally restricted to a Chinese-language context.
The startup and error messages emitted to users are fixed in Chinese. This is a locale policy issue because the file does not offer user opt-in or explain a justified reason for enforcing a single language.
Detected: suspicious.env_credential_access, suspicious.insecure_tls_verification