Back to skill

Security audit

腾讯企业邮箱/qqexmail

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly does what it says, but its email-sending script disables TLS certificate verification, which could expose mailbox credentials and sent email on a compromised network.

Review before installing. This skill will use your Tencent Exmail account and authorization code to read and send mail, and it may print email contents to the console. Do not use the sending script until tls.rejectUnauthorized: false is removed, and prefer pinned, reviewed dependencies before using it with a real mailbox.

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

Error
Location
scripts/send.js:17
Finding

SMTP TLS Certificate Validation Is Disabled

Content
View full analysis

Vulnerability Details

File Location: scripts/send.js, lines 17–21
Vulnerability Type: Improper TLS certificate validation
Risk Level: High

Vulnerable Code

js
tls: {
  rejectUnauthorized: false,
  servername: 'smtp.exmail.qq.com',
},

Technical Analysis

The SMTP transport explicitly sets rejectUnauthorized to false. Although the connection uses TLS on port 465, this setting disables validation of the SMTP server's certificate chain. The client can therefore accept a self-signed, expired, or otherwise untrusted certificate.

This undermines server authentication and makes the connection vulnerable to an active man-in-the-middle attack. The servername option does not compensate for disabled certificate validation.

Attack Path

  1. An attacker obtains a privileged network position or manipulates DNS/routing for smtp.exmail.qq.com.
  2. The attacker redirects the SMTP connection to a server presenting an untrusted certificate.
  3. The client accepts that certificate because rejectUnauthorized is disabled.
  4. The client transmits the configured mailbox account and authorization code during SMTP authentication.
  5. The attacker may capture credentials and outgoing email content, then relay or manipulate the SMTP session to reduce the chance of detection.

Impact Assessment

A successful attacker could obtain the EXMAIL_ACCOUNT value, the mailbox authorization code, recipient addresses, subjects, and message bodies sent through the Skill. Depending on the permissions associated with the authorization code, credential compromise could enable unauthorized mailbox access or email transmission.

Exploitation requires control over or interference with the victim's network, DNS, proxy, or routing path. The flaw does not itself grant local operating-system privileges.

The network access in scripts/get-body.js is not considered unauthorized behavior: it sends credentials to the documented Tencent Exmail IMAP endpoint over TL ...[truncated 92 chars]

Remediation
View remediation

Remediation Suggestions

Remove the custom option that disables certificate verification and rely on secure defaults:

js
const transporter = nodemailer.createTransport({
  host: 'smtp.exmail.qq.com',
  port: 465,
  secure: true,
  auth: {
    user: account,
    pass: authCode,
  },
  tls: {
    servername: 'smtp.exmail.qq.com',
    rejectUnauthorized: true,
  },
});

Alternatively, omit the tls block entirely if no custom TLS configuration is required. The application should fail closed when the certificate is expired, untrusted, or does not match the expected hostname.

If a private trust chain is genuinely required, configure a narrowly scoped trusted CA certificate rather than disabling verification globally. Avoid logging authentication secrets, and rotate the mailbox authorization code if the Skill was previously used over an untrusted network.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (23)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The documented behavior claims the skill can receive mail, list messages, and fetch message bodies, while the detected code apparently only sends mail. This mismatch is dangerous because users and agents may trust the documentation and grant sensitive mailbox credentials or approve actions under false assumptions, creating room for misuse, hidden functionality, or unsafe operational decisions.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 29)May include surrounding context.

md
| `scripts/receive.js` | 从环境变量读凭证,用 imap + mailparser 连接腾讯企业邮箱 IMAP 收信;支持「最近 N 条」或「最近 N 天」,输出主题、发件人、日期、**UID**、正文摘要。 |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 52)May include surrounding context.

md
| `scripts/receive.js` | 从环境变量读凭证,用 imap + mailparser 连接腾讯企业邮箱 IMAP 收信;支持「最近 N 条」或「最近 N 天」,输出主题、发件人、日期、**UID**、正文摘要。 |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 55)May include surrounding context.

md
| `scripts/receive.js` | 从环境变量读凭证,用 imap + mailparser 连接腾讯企业邮箱 IMAP 收信;支持「最近 N 条」或「最近 N 天」,输出主题、发件人、日期、**UID**、正文摘要。 |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 58)May include surrounding context.

md
| `scripts/receive.js` | 从环境变量读凭证,用 imap + mailparser 连接腾讯企业邮箱 IMAP 收信;支持「最近 N 条」或「最近 N 天」,输出主题、发件人、日期、**UID**、正文摘要。 |

Known Vulnerable Dependency: linkify-it==5.0.0 — 2 advisory(ies): CVE-2026-48801 (LinkifyIt#match scan loop has quadratic algorithmic complexity); CVE-2026-59887 (linkify-it: Quadratic-complexity DoS via the `mailto:` validator scan-loop on at)

High
Category
Supply Chain
Confidence
92% confidence
Finding

linkify-it 5.0.0 is flagged for quadratic-time parsing issues, which can enable denial of service when attacker-controlled email content is parsed. In this skill’s context, mailparser processes inbound email bodies, so a crafted message could trigger excessive CPU consumption during message parsing or text extraction.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: nodemailer==8.0.3 — 10 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) +7 more

High
Category
Supply Chain
Confidence
95% confidence
Finding

nodemailer 8.0.3 appears as a transitive dependency under mailparser and is associated with multiple advisories including header injection and resource-exhaustion issues. Even if used indirectly, vulnerable mail-processing or message-construction code in a mail-handling skill increases risk because inputs such as addresses, headers, and MIME content may originate from untrusted emails.

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

nodemailer 6.10.1 is the direct mail-sending library for this skill, and known vulnerabilities in header parsing/construction and content resolution are highly relevant in an SMTP skill that may send user-supplied subjects, recipients, or body content. If untrusted input is inserted into message headers or content options, attackers may exploit injection or bypass protections intended to restrict file/URL access.

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
88% confidence
Finding

semver 5.3.0 is vulnerable to ReDoS, but here it is a transitive dependency of utf7 used by imap rather than an obviously exposed parser handling attacker-supplied version strings at runtime. The issue is real in the dependency tree, though in this skill context exploitability appears limited compared with the mail-parsing and SMTP libraries.

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
94% confidence
Finding

The analysis indicates installation of nodemailer 6.10.1, a version with multiple published advisories including header injection and denial-of-service issues. In a skill whose core purpose is sending email over SMTP, vulnerabilities in message/header parsing and content resolution are especially relevant because attacker-controlled email fields may be processed directly.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill advertises access to environment variables and outbound network services but does not declare any explicit tool scope or permission boundary. In an agent environment, this weakens least-privilege controls and can allow a mail-handling skill to access secrets and communicate externally without transparent user or platform review.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code connects to a mailbox, fetches message bodies, parses them, and prints sender, subject, date, UID, and a body preview to the console. While there is runtime logging for connection status and errors, there is no disclosure warning that the script will access and expose potentially sensitive email metadata and content.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

The SMTP transport explicitly sets tls.rejectUnauthorized to false, which disables certificate validation and defeats TLS server authentication. This allows a man-in-the-middle with network position to intercept credentials and email contents or impersonate the mail server, which is especially dangerous because this skill handles enterprise email authentication and message data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

This code accepts arbitrary content from command-line arguments or stdin and sends it over SMTP, but the only visible messages are usage errors and a success/failure log. There is no explicit disclosure in comments or user-facing output that stdin/body content will be transmitted externally via email, which is a safety-relevant network action for a generic send script.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The package name is given only in Chinese ("腾讯企业邮箱"), which indicates a language-specific presentation without any accompanying opt-in, language choice, or justification in this file. Under the stated policy, forcing a specific language or locale without user choice can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
98% confidence
Finding

The dependency uses a caret range (^0.8.19), which permits installation of newer patch/minor releases instead of a single audited version. This increases supply-chain risk and can lead to non-reproducible builds or unexpected introduction of vulnerable/transitively compromised code.

Content

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

json
"version": "1.0.0",
  "type": "module",
  "dependencies": {
    "imap": "^0.8.19",
    "mailparser": "^3.6.5",
    "nodemailer": "^6.9.7"
  }

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
98% confidence
Finding

The dependency uses a caret range (^3.6.5), allowing version drift beyond the specifically reviewed release. In a mail-processing skill, this can expose the package to unreviewed parser changes or newly introduced supply-chain issues at install time.

Content

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

json
"type": "module",
  "dependencies": {
    "imap": "^0.8.19",
    "mailparser": "^3.6.5",
    "nodemailer": "^6.9.7"
  }
}

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
99% confidence
Finding

The nodemailer dependency is declared with a caret range (^6.9.7), which allows newer releases to be installed implicitly. Because this skill sends email and directly depends on nodemailer, version drift is more dangerous here: it can pull in a release with known security issues or behavioral changes affecting message construction and header handling.

Content

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

json
"dependencies": {
    "imap": "^0.8.19",
    "mailparser": "^3.6.5",
    "nodemailer": "^6.9.7"
  }
}

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The error message is hardcoded in Chinese, and similar Chinese-only output appears elsewhere in the script. This is a natural-language locale policy concern because the skill does not offer user opt-in or indicate that it is intentionally limited to Chinese-speaking users.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The script accesses EXMAIL_ACCOUNT and EXMAIL_AUTH_CODE to authenticate to the mail server. There is no comment, docstring, or warning explaining that mailbox credentials are required and will be used to log into an external service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

The script reads EXMAIL_ACCOUNT and EXMAIL_AUTH_CODE from environment variables to authenticate to an external mail server. While it errors if they are missing, it does not include any comment, docstring, or user-facing explanation about handling mail credentials or the sensitivity of these values.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script's natural-language output is written entirely in Chinese, including error and usage messages, with no indication that the tool is intentionally region-specific or that users can opt into another language. This can violate language/locale policy when a skill forces a language without user choice or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The usage, success, and failure messages shown to users are all hard-coded in Chinese. Without an explicit locale justification or configurable language support, this is a natural-language policy concern under the requirement not to force a specific language by default.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.env_credential_access, suspicious.insecure_tls_verification

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/get-body.js:4

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/receive.js:4

HTTPS certificate verification is disabled.

Warn
Code
suspicious.insecure_tls_verification
Location
scripts/send.js:20