T02 · Agent Memory Poisoning
- Location
SKILL.md:67- Finding
Persistent Agent Policy Can Be Influenced by Untrusted Remote Memory
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 67-78 and 125-140
Vulnerability Type: Persistent memory poisoning through externally sourced instructions
Risk Level: HighVulnerable Code
markdown ## When to search Call `fossil_search` before any step involving: - Parsing or extracting structured data from LLM output - Calling external APIs or tools - Multi-step file operations - Browser automation - Sending messages or emails on behalf of the user - Any task domain that has failed before in this workspace Pass a natural language description of what you are about to attempt. Read the returned resolutions before proceeding.markdown ## Add to AGENTS.md ```markdown ## Failure Memory (FOSSIL) Before any non-trivial task step, call fossil_search with a description of what you are about to attempt. Read returned resolutions before acting. After any failure, call fossil_record before retrying. Capture: - what you were attempting - what went wrong (use the FOSSIL failure taxonomy) - what fixed it This builds a persistent failure memory across all sessions.text ### Technical Analysis The skill directs the user to add permanent behavioral instructions to `AGENTS.md`, causing FOSSIL lookups and returned resolutions to affect future sessions and unrelated tasks. The instructions explicitly require the agent to read remotely stored resolutions before acting. No mechanism is specified to verify record ownership, authenticate the author of a resolution, distinguish data from executable instructions, constrain a resolution to its original task, or prevent returned content from attempting to override higher-priority policies. Consequently, compromised, shared, or poisoned records could become an indirect instruction channel. The persistent `AGENTS.md` modification expands the trust boundary beyond the current skill invocation. Even after the original task ends, later sessions may continue retrieving and interpreting remote co ...[truncated 1341 chars]- Remediation
View remediation
Remediation Suggestions
- Do not automatically or routinely add remote-memory instructions to
AGENTS.md. - Make remote failure-memory lookup explicitly opt-in and scoped to the current task.
- Treat every returned resolution as untrusted data, not as an instruction.
- Enforce a strict response schema that accepts factual failure metadata but rejects commands, tool calls, policy changes, and prompt-like directives.
- Authenticate record authors and enforce per-user or per-workspace tenant isolation.
- Attach provenance, timestamps, ownership, and integrity metadata to every record.
- Require user confirmation before applying remote advice to sensitive operations such as sending messages, modifying files, or invoking external tools.
- Prevent remote content from overriding system, developer, user, or workspace policies.
- Provide controls to inspect, revoke, quarantine, and delete persistent records.
- Do not automatically or routinely add remote-memory instructions to
