Back to skill

Security audit

163邮箱助手免费版

Security checks for vulnerabilities and agentic risk

Overview

This 163 email helper is mostly purpose-aligned, but it handles mailbox credentials and destructive email actions without enough safeguards or clear scoping.

Install only if you are comfortable giving the skill and its underlying CLI access to read, send, move, and delete mail in your 163 account. Prefer environment variables or an OS credential store over the plaintext config file, manually restrict any config file to owner-only permissions, confirm exact message or folder IDs before destructive actions, and choose safe download locations for attachments.

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

Mailbox Authorization Code Stored in a Plaintext Configuration File Without Enforced Permissions

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:184-196 and SKILL.md:245-250
Vulnerability Type: Plaintext sensitive credential storage with missing permission enforcement
Risk Level: Medium

The documented setup process instructs users to store a reusable 163.com mailbox authorization code in a plaintext JSON configuration file:

json
{
  "email": "your_email@163.com",
  "password": "your_auth_code",
  "imap_server": "imap.163.com",
  "imap_port": 993,
  "smtp_server": "smtp.163.com",
  "smtp_port": 465
}

The section presented as configuration-file permission protection does not set or verify restrictive permissions:

bash
# Core implementation logic for this skill
# Refer to the usage instructions above for configuration and invocation
echo "implementation_ready"

Technical Analysis

A mailbox authorization code is a reusable authentication secret that can grant IMAP and SMTP access. The primary setup workflow places this secret in $HOME/.config/email-163-tool/config.json as plaintext.

Although a later recommendation says that the file should use mode 600, the documented protection procedure only prints a status message. It does not create the directory securely, restrict the file permissions, validate ownership, or reject an existing group-readable or world-readable file.

Consequently, the file's effective permissions depend on the user's umask, editor, file-copying method, and pre-existing directory permissions. On a multi-user system, container host, shared development environment, or compromised workstation, another local account or process may be able to read the authorization code.

The example value is a placeholder rather than a hardcoded production secret. The vulnerability arises when users follow the instructions and replace it with a real authorization code without effective permission enforcement.

Attack Path

  1. A user enables IMAP and SMTP access for a 163.com mailbox and obtains a client authoriza ...[truncated 1532 chars]
Remediation
View remediation

Remediation Suggestions

  1. Make environment-variable storage or an operating-system credential manager the primary documented configuration method.
  2. If a configuration file is required, create the parent directory and file with restrictive permissions before writing credentials:
bash
install -d -m 700 "$HOME/.config/email-163-tool"
install -m 600 /dev/null "$HOME/.config/email-163-tool/config.json"
  1. Replace the ineffective permission-protection example with commands that enforce and verify permissions:
bash
chmod 600 "$HOME/.config/email-163-tool/config.json"
test "$(stat -c '%a' "$HOME/.config/email-163-tool/config.json")" = "600"
  1. On platforms where stat -c is unavailable, provide an equivalent platform-specific check.
  2. At runtime, verify that the file is owned by the current user and is not accessible by group or other users. Refuse to load credentials if validation fails.
  3. Avoid printing the authorization code in command output, logs, errors, or debugging traces.
  4. Document immediate revocation and replacement of the authorization code if the file may have been exposed.
  5. Add the configuration path to version-control ignore guidance and warn users not to copy it into shared directories, backups, support bundles, or container images.
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 (6)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The activation description is overly broad and self-referential, which makes it unclear when the skill should be used and can cause over-invocation. In an agent setting, vague routing criteria can lead to the skill being selected for unrelated requests, unnecessarily exposing mail, filesystem, or command-execution capabilities.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The description explicitly states "支持中文交互" as a behavioral constraint, and the document consistently frames operation in Chinese without presenting it as optional. This can violate language or locale policy when no user opt-in or justified region-specific limitation is provided.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill includes destructive operations like deleting emails and deleting folders without requiring confirmation or warning users about irreversible effects. In an autonomous or semi-autonomous agent workflow, this can lead to accidental data loss from ambiguous prompts, mis-parsing, or unsafe default behavior.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill is presented as a basic 163 email helper, but its documented scope expands into generic automation features such as arbitrary file handling, API integration, information retrieval, and command execution. This mismatch increases the chance an agent will invoke broader capabilities than users expect, enabling unnecessary access to the filesystem or shell in a context that should be narrowly constrained to mail operations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The attachment-download behavior writes files to local directories but does not clearly warn about filesystem side effects, path safety, or overwrite risks. This can cause unintended local file creation, storage of untrusted content, or writing into unsafe locations if an agent follows loosely specified output paths.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

Under '配置文件权限保护', the comment states '本技能的核心实现逻辑', implying substantive implementation, yet the code shown is only echo "implementation_ready". This actively misrepresents the presence of real functional logic rather than merely omitting detail.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.