T02 · Agent Memory Poisoning
- Location
SKILL.md:156- Finding
Persistent Self-Modification of Skill Activation Rules
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 156
Vulnerability Type: Persistent modification of agent behavior
Risk Level: MediumVulnerable Code:
markdown 每次使用后,如发现业务场景未被覆盖,应将新的触发词追加到 SKILL.md 的 description 触发词列表中。English translation: “After each use, if an uncovered business scenario is found, append the new trigger terms to the trigger-term list in the
descriptionfield ofSKILL.md.”Technical Analysis
This instruction directs the Agent to modify the installed Skill after use by appending newly observed trigger terms to persistent Skill metadata. These modifications can survive the current session and change when the Skill is activated in future sessions.
The update mechanism lacks user approval, provenance tracking, validation, deduplication, scope restrictions, and a trusted review process. Because the proposed trigger terms can originate from user-controlled requests, an untrusted user may indirectly influence the Skill's persistent activation rules.
Attack Path
- An attacker submits a request containing an unusual or overly broad phrase.
- The Agent determines that the business scenario is not represented by the current trigger list.
- Following line 156, the Agent appends the attacker-influenced phrase to
SKILL.md. - The modified trigger remains available across future sessions.
- Subsequent requests containing that phrase may activate the Skill in unrelated or unintended contexts.
Impact Assessment
Successful exploitation can persistently broaden the Skill's activation scope and affect future Agent behavior. It does not directly grant operating-system privileges, execute code, or expose credentials. Its scope is limited to persistent Skill configuration and future Skill-selection behavior, but repeated poisoning could cause inappropriate activation, degraded task routing, and durable behavioral influence.
- Remediation
View remediation
Remediation Suggestions
- Remove the instruction requiring automatic modification of
SKILL.md. - Present newly proposed trigger terms to the user or Skill maintainer as non-persistent recommendations.
- Require explicit, trusted approval before changing activation metadata.
- Validate approved triggers against length, syntax, scope, and duplication constraints.
- Reject control instructions, broad generic phrases, and content derived directly from untrusted input.
- Apply changes through version control so modifications are attributable, reviewable, and reversible.
- Keep the installed Skill read-only during ordinary execution where practical.
- Remove the instruction requiring automatic modification of
