T02 · Agent Memory Poisoning
- Location
SKILL.md:4- Finding
Untrusted Web Content Can Poison Persistent Agent Memory and Operational Rules
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 4-9 and 19
Vulnerability Type: Persistent memory poisoning through untrusted web content
Risk Level: HighVulnerable Code Snippet
markdown ## Overview This skill empowers the assistant to autonomously learn from online resources, distill complex documentation (like Anthropic Skilljar or MCP guides), and integrate these findings into the system's long-term memory (MEMORY.md) and operational rules (AGENTS.md). ## Capabilities - **Deep Web Fetching**: Recursively fetch and summarize multi-page documentation sites. - **Knowledge Distillation**: Extract core primitives, transport patterns, and tool-use strategies from technical docs. - **System Integration**: Automatically update workspace rules (AGENTS.md) and memory (MEMORY.md) with newly acquired insights. - **Routing Optimization**: Advise on model selection (e.g., local Ollama vs. Cloud) based on learned task complexity.markdown - `edit`/`write`: Update system configuration and memory files.The same unsafe workflow is confirmed by
README.md, lines 3-11:markdown A skill designed to help the assistant autonomously learn, distill, and integrate complex technical documentation (like Anthropic Skilljar or MCP guides) into the OpenClaw system's long-term memory (MEMORY.md) and operational rules (AGENTS.md). ## Capabilities - **Technical Distillation**: Automatically fetch and summarize technical resources. - **System Integration**: Update AGENTS.md and MEMORY.md with new insights. - **Resource Optimization**: Advise on model selection based on task complexity. ## Setup & Training To use this skill, point the assistant to a URL or documentation site. It will then fetch, summarize, and integrate the findings according to the guidelines in SKILL.md.Technical Analysis
The Skill combines recursive retrieval of externally controlled documentation with auto ...[truncated 3465 chars]
- Remediation
View remediation
Remediation Suggestions
- Prohibit automatic modification of operational rules. Remove
AGENTS.mdfrom the Skill's writable targets. Documentation summarization does not require permission to alter Agent instructions. - Require explicit approval before persistence. Display a complete diff of any proposed
MEMORY.mdchange and obtain informed user confirmation immediately before writing. - Quarantine retrieved material. Initially store summaries in a dedicated, non-executable review file rather than in memory or instruction files.
- Treat web content only as data. Explicitly prohibit obeying instructions found in fetched pages. Extract factual claims into a strict schema and reject imperative text, tool directives, requests for secrets, and attempts to override existing rules.
- Apply source controls. Use an allowlist of approved domains, enforce HTTPS, limit redirects, cap recursion depth and page count, and record source URLs and retrieval timestamps.
- Preserve provenance. Attribute every persisted claim to its exact source and keep externally derived content clearly separated from trusted local instructions.
- Enforce rule precedence. Make system and workspace security policies immutable to this Skill and ensure retrieved content cannot override them.
- Minimize tool privileges. Grant web retrieval by default, but provide write access only to a designated output file. Avoid general
edit,write, orexecaccess unless separately approved for a specific operation. - Add injection review. Scan fetched content and generated summaries for instruction-hijacking patterns, encoded directives, secret requests, and attempts to trigger tool calls. Treat detection as a reason to stop and request user review rather than as a complete security boundary.
- Support rollback and auditing. Back up approved state files, log reviewed changes and their provenance, and provide a reliable way to revert po ...[truncated 15 chars]
- Prohibit automatic modification of operational rules. Remove
