T02 · Agent Memory Poisoning
- Location
SKILL.md:106- Finding
Untrusted User Feedback Can Poison Persistent Agent Behavior
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is not overtly malicious, but it gives other skills persistent self-modifying behavior with broad triggers and weak safeguards.
Install only if you intentionally want skills to gain persistent learning behavior. Use a dry run first, back up the target skill, review every generated file before use, avoid storing secrets or raw user data in .learnings, and require explicit approval before promoting learnings into durable rules.
SKILL.md:106Untrusted User Feedback Can Poison Persistent Agent Behavior
assets/ERRORS-TEMPLATE.md:20Error Logging Template Can Persist Sensitive Diagnostic Data in Plaintext
scripts/generate-evolution.sh:130Scaffold Generator Overwrites Existing Files and Follows Destination Symlinks
The trigger extraction guidance includes generic fallback phrases like '不对', '不是这样', '改一下', which are common in ordinary conversation and likely to match unrelated feedback. This can cause persistent logging or evolution actions from ambiguous remarks, enabling accidental or adversarial poisoning of a skill's learnings and causing self-modifying behavior based on weak signals.
The README states that the skill will generate .learnings/ and EVOLUTION.md for a target skill, but it does not clearly warn that this means writing into the target skill's directory. Because this skill is specifically designed to modify other skills, the missing disclosure can mislead users about side effects and increase the risk of unintended persistent changes.
The documented trigger phrase is broad enough to overlap with normal user requests, which can cause the skill to activate unexpectedly. In a skill that adds self-evolution and writes learning artifacts, accidental activation increases the chance of unintended file generation or modification in other skills' directories.
The manifest description is broadly worded to apply self-evolution to 'any skill' across many scenarios, which can cause over-activation and unintended invocation on generic user requests. In a skill-routing system, broad activation increases the chance this skill modifies or augments other skills without sufficiently specific user intent, expanding attack surface and making downstream risky behaviors easier to trigger.
Forcing generated files into an inferred language without asking the user can mis-handle multilingual contexts and cause incorrect or opaque configuration artifacts. In a self-evolution skill, this matters because generated rules and learnings may later drive automated behavior, so a mistaken language inference can reduce user oversight and increase the chance of unnoticed misconfiguration.
The skill explicitly instructs enhanced skills to retain prior interaction content in .learnings files and to surface used learnings back to the user in outputs and summaries. This creates a persistence and disclosure risk: sensitive user-provided details, corrections, or preferences may be stored long-term and later echoed inappropriately, especially when propagated across tasks or surfaced automatically.
Line L29 specifies a fixed target language field limited to zh | en. This is a natural-language policy concern because it imposes a language constraint without stating that the user may choose freely or that the limitation is justified by a region-specific purpose.
This markdown template asks authors to define when the agent should check learnings, but only provides generic placeholders for activation conditions and no requirement for concrete scope, exclusions, or negative examples. That can lead to overly broad hook activation once instantiated, causing unintended skill invocation in ordinary contexts.
The activation condition 'After suggesting optimization steps' is ambiguous because it triggers on the agent's own prior behavior rather than a clear external event or explicit user signal. In a self-evolution enhancer, this can create automatic post-action activation loops and excessive learning capture, especially in operational or troubleshooting skills where optimization steps are routine.
The guidance explicitly recommends generic fallback triggers such as '用户纠正' and '操作失败', which are likely to occur during normal interaction and can cause the self-evolution workflow to activate far more often than intended. In a skill that adds persistent learning and rule-promotion behavior, overbroad triggers increase the chance of logging benign conversation as learning events, causing prompt-scope creep and unintended behavioral drift across future runs.
Mandating output in the language inferred from SKILL.md removes user choice and can lead to responses or generated scaffolding in a language the current user did not request or understand. In this skill's context, the main risk is misconfiguration, operator confusion, and reduced transparency of learning artifacts rather than direct code execution or privilege escalation.
The markdown includes a prescribed example response in Chinese: "本次参考了经验 [LRN-xxx]: ...". Because the document presents this as the feedback wording to use and does not offer language choice or explain a locale-specific requirement, it creates a natural-language locale policy concern.
The EVOLUTION.md integration section provides a full example sentence in Chinese as the model wording for user disclosure. Without any accompanying instruction to match the user's language or an explanation that the skill is region-specific, this is a language-policy violation in natural-language guidance.
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.
cat << EOF
Usage: $(basename "$0") <target-skill-path> [options]
Create self-evolution scaffolding in a target skill. Output structure matches self-improving-agent:
target-skill/.learnings/LEARNINGS.md, ERRORS.md, FEATURE_REQUESTS.md
Arguments:
The placeholder example on L47 uses Chinese labels as one of the suggested values, but the template does not state that language selection is optional or tied to a specific locale. This can be read as steering skill outputs toward a specific language without documented opt-in.
The template provides a concrete annotation example in Chinese ("本次参考了 ...") and later Chinese-language trigger examples, without stating that language choice should follow user preference. In a reusable template, this can normalize a fixed-language response pattern that conflicts with language/locale choice expectations.
This markdown template includes placeholder guidance for domain descriptions and areas, but it does not specify any concrete activation phrases, boundaries, or negative examples for when a related skill should or should not be invoked. In a skill ecosystem, such broad domain descriptors can contribute to ambiguous invocation behavior if reused as trigger guidance.
The placeholder examples for DOMAIN_AREAS and PROMOTION_TARGETS include Chinese text and Chinese-named files as exemplar values. In a reusable template, this can implicitly steer skill authors toward a fixed language/locale without documenting that language choice is optional or context-specific.