T01 · Skill Instruction Hijacking
- Location
SKILL_EN.md:174- Finding
Untrusted Mailbox Content Can Hijack the Receiving Agent's Instructions
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill has a coherent purpose, but it sets up a persistent shared mailbox for agents without enough safety guidance around trust, permissions, or automatic processing.
Install only for mutually trusted local agents. Use a private mailbox directory with restrictive permissions, avoid putting secrets in messages, treat every mailbox file as untrusted data, require user approval before acting on message requests, sanitize filenames and subjects, and avoid cron or watchdog polling unless you intentionally want persistent background processing and know how to disable it.
SKILL_EN.md:174Untrusted Mailbox Content Can Hijack the Receiving Agent's Instructions
SKILL_EN.md:82Unchecked Path Components Permit Directory Traversal, Overwrite, and Symlink Attacks
The README instructs users to create a shared mailbox under the home directory and exchange messages by creating, reading, and moving files, but it provides no guidance on filesystem permissions, trust boundaries, or tamper risks. In a cross-agent setting, any process with access to that directory may read, alter, inject, or delete messages, which can leak data or cause one agent to act on forged instructions.
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.
mkdir -p ~/.shared-mailbox/{agent-a-to-b,agent-b-to-a}/{archive}
The Quick Start directs creation of a long-lived shared mailbox directory in the user's home folder, establishing persistent on-disk state for cross-agent communication. In security-sensitive environments, this persistent shared channel can outlive the session, retain sensitive data, and be reused by other agents or processes without sufficient visibility or access controls.
mkdir -p ~/.shared-mailbox/{agent-a-to-b,agent-b-to-a}/{archive}
The cron example establishes a persistent scheduled task that repeatedly executes a script, which is a form of session persistence on the host. Even though presented as convenience, persistence mechanisms increase risk because they continue operating after the initial session and may process untrusted mailbox contents indefinitely or unexpectedly consume resources.
Create cron task to check mailbox every 5-10 minutes:
# Check every 5 minutes
The skill's natural-language description and instructions are entirely in Chinese, with no indication that the user can choose another language or that the locale restriction is required for a region-specific purpose. Under SQP-3, forcing a specific language without opt-in is a policy concern.
The skill introduces session persistence by storing inter-agent messages and read-state under ~/.shared-mailbox, creating a durable local message store that may contain sensitive prompts, outputs, or agent-to-agent coordination data. In a multi-user or weakly permissioned environment, these files can be read, modified, replayed, or poisoned by other local processes, and the persisted history increases the blast radius of prompt injection or data leakage over time.
mkdir -p ~/.shared-mailbox/{agent-a-to-b,agent-b-to-a}/{archive}
The skill's core design introduces cross-session message persistence through a shared mailbox directory, allowing one agent to leave content for later automatic consumption by another. Persistent inter-agent state is risky because untrusted files can survive across runs, be replayed, or be planted by other local processes with directory access, potentially influencing later agent behavior.
Agent A → Write to → shared-mailbox/a-to-b/ → Agent B reads
Agent B → Write to → shared-mailbox/b-to-a/ → Agent A reads
The cron-based polling option establishes persistent scheduled execution, which can continue running unattended and repeatedly process mailbox contents. In an agent context, this increases risk of unintended autonomous behavior, repeated processing loops, and prolonged exposure to malicious or malformed messages dropped into the watched directory.
Create cron task to check mailbox every 5-10 minutes:
# Check every 5 minutes
The README tells users to create a cron task that repeatedly runs a script every 5 minutes, which is a persistent system-level automation change. Although the behavior is shown, there is no explicit warning that this will continue running in the background and repeatedly access the mailbox until removed.
The README instructs users to create, write to, and move files within a shared directory under the user's home folder, but it does not warn about the privacy, integrity, and multi-process risks of using a shared mailbox. In an agent context, silent file creation and movement can expose sensitive prompts or outputs to other local processes and may lead users to enable the pattern without understanding the security tradeoffs.
This SKILL.md instructs users to create directories, write mailbox files, and move files into an archive as part of the workflow. Although these actions are central to the skill, the markdown does not explicitly warn that it will create and modify files under ~/.shared-mailbox, which is the kind of user-data/system-state impact SQP-2 asks to disclose in markdown descriptions.
The documentation states that mailbox files should follow the format YYYY-MM-DD_NNN_简短主题.md with an example like 2026-04-15_001_打招呼.md (L168-L172), but send_letter actually generates filenames as %Y-%m-%d_%H%M_{subject}.md, using time-of-day rather than a sequence number. This is an active contradiction between the documented protocol and the code example implementing message creation.
This markdown skill instructs the user to create and use ~/.shared-mailbox and later provides code that writes and archives message files there. While file operations are central to the skill, the document does not include a clear warning that using the skill will create, modify, and move files under the user's home directory.