T02 · Agent Memory Poisoning
- Location
SKILL.md:494- Finding
Persistent Agent Instruction Modification Through Untrusted Feedback
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 494–503
Vulnerability Type: Persistent memory and instruction poisoning
Risk Level: MediumVulnerable Code
markdown ### 改进来源 1. **用户反馈**: 分析报告的使用反馈 2. **同行评审**: 其他专家的评审意见 3. **复盘总结**: 每次分析后的经验总结 ### 改进流程 1. 发现问题/改进机会 2. 记录到 `self-improving/technical-analysis.md` 3. 更新本 SKILL.md 或相关模板 4. 通知相关使用方The instructions identify user feedback and peer review as improvement sources, direct the Agent to persist resulting material in
self-improving/technical-analysis.md, and then direct it to updateSKILL.mdor related templates.Technical Analysis
User feedback and peer-review content may be attacker-controlled. The workflow does not require source validation, sanitization, human approval, or separation between untrusted feedback and executable Agent instructions before persistent storage and Skill modification occur.
Because
SKILL.mdcontrols future Agent behavior, incorporating attacker-supplied rules into that file or its templates creates a persistent instruction channel. The poisoned content could subsequently be loaded in future sessions and treated as trusted Skill guidance.The reviewed package does not itself contain an explicit malicious payload or a safety-bypass instruction. The vulnerability is the unsafe persistence and self-modification mechanism, which creates an exploitable path for long-term memory poisoning.
Attack Path
- An attacker submits crafted content presented as report feedback or peer review.
- The content includes instructions intended to alter future analyses, such as weakening source requirements or adding attacker-selected output.
- Following the improvement workflow, the Agent records the material in
self-improving/technical-analysis.md. - The Agent updates
SKILL.mdor a related report template without a mandatory human approval boundary. - A later session loads the modified Skill or template.
- The Agent follows the persist ...[truncated 932 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove instructions that permit the Agent to modify
SKILL.mdor templates automatically. - Treat all user feedback and peer-review material as untrusted data rather than executable instructions.
- Store proposed improvements in a non-executable review document that is never loaded as Agent guidance.
- Require explicit human review and approval before changing Skill instructions, templates, or persistent memory.
- Validate proposed changes against an allowlist of permitted documentation fields and reject embedded operational instructions.
- Restrict runtime write access to
SKILL.md, templates, and persistent memory locations. - Preserve immutable, version-controlled copies of Agent instructions and review all changes through signed commits or an equivalent approval process.
- Add provenance metadata for every proposed change, including its source, reviewer, approval status, and timestamp.
- Ensure untrusted feedback is quoted or escaped when included in review artifacts so that it cannot be interpreted as an instruction.
- Remove instructions that permit the Agent to modify
