T02 · Agent Memory Poisoning
- Location
SKILL.md:8- Finding
Untrusted Web Content Can Influence Persistent Agent Knowledge
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:8-28, 134-136, 156, 185-270
Vulnerability Type: Persistent memory poisoning through untrusted external content
Risk Level: MediumVulnerable Code
yaml permissions: filesystem: read: - USER.md # User context for [E] Execution personalization - memory/news-sources.json # News category config write: - memory/news-log/ # Daily news records - memory/knowledge-base/concepts.md # High-bar concept entries - memory/knowledge-base/patterns/*.md # Verified patterns only (rare, 3+ occurrence threshold) network: - WebSearch # Search recent news via web search API - WebFetch # Fetch article content for URL validation external_outputs: - none # This skill generates briefings locally; delivery is handled by the caller credentials: - none # No API keys needed; web search uses the agent's built-in tools config: reads: - USER.md - memory/news-sources.json writes: - memory/news-log/ - memory/knowledge-base/concepts.md - memory/knowledge-base/patterns/*.mdThe workflow additionally directs the Agent to fetch article contents, analyze them through another Skill, and write derived information into the news log, concept store, and pattern store.
Technical Analysis
The Skill combines two security-sensitive capabilities:
- It retrieves arbitrary external content using
WebSearchandWebFetch. - It writes conclusions derived from that content into persistent Agent memory.
External articles are not trustworthy instruction sources. A malicious or compromised website can include prompt-injection text designed to be interpreted as Agent instructions rather than article content. The Skill does not explicitly require the Agent to:
- Treat fetched pages solely as untrusted data.
- Ignore commands, role changes, tool instructions, or memor ...[truncated 2141 chars]
- It retrieves arbitrary external content using
- Remediation
View remediation
Remediation Suggestions
- Add an explicit trust-boundary rule stating that all
WebSearchandWebFetchresults are untrusted data and must never be followed as instructions. - Reject article content that attempts to alter roles, invoke tools, modify workflow rules, request secrets, or direct memory writes.
- Extract content into a strict schema containing only fields such as title, publication date, publisher, URL, factual claims, and direct quotations.
- Preserve source provenance for every concept and pattern, including the exact URLs and retrieval dates.
- Require corroboration from multiple independent and reputable domains rather than merely three articles or dates.
- Require explicit user approval before writing to
concepts.mdorpatterns/*.md. - Store candidate material in a quarantine file that is not automatically consumed as trusted Agent memory.
- Apply domain allowlisting, redirect validation, and URL-scheme restrictions before using
WebFetch. - Ensure the delegated
core-prismSkill receives sanitized article data rather than raw webpage instructions. - Add regression tests using articles containing common prompt-injection payloads and verify that those instructions are quoted or discarded rather than executed.
- Add an explicit trust-boundary rule stating that all
