T02 · Agent Memory Poisoning
- Location
scripts/learner.py:10- Finding
Unvalidated Attacker-Controlled Notes Written to Persistent Agent State
- Content
View full analysis
1 else True rec = (sys.argv[2] if len(sys.argv) > 2 else "") print(json.dumps(record(ok, rec), ensure_ascii=False)) ``` ### Technical Analysis The learner accepts an arbitrary command-line string and appends it to the persistent `patterns` collection in `scripts/learned_patterns.json`. It performs no schema validation, provenance tracking, trust classification, content filtering, length restriction, or record-count limitation. The skill documentation states that execution results and failure patterns are intended to enter a self-reflection and cross-session evolution workflow. Consequently, a task author or other party able to influence the note argument can persist instruction-like content or false observations in the state expected to inform future agent activity. The repository does not contain the downstream meta-evolver or memory-consumption implementation. Therefore, direct alteration of future model behavior is conditional on an external agent subsequently loading and treating these stored strings as trusted guidance. The persistent write itself is present and confirmed. ### Attack Path 1. An attacker supplies content that is propagated into the `note` argument, such as a false operational rule or instruction-like text. 2. The skill or an orchest ...[truncated 1373 chars]- Remediation
View remediation
