T02 · Agent Memory Poisoning
- Location
references/heartbeat.md:3- Finding
Persistent Autonomous Negotiation Instructions Written to Heartbeat State
- Content
View full analysis
Vulnerability Details
File Location:
references/heartbeat.md:3-10
Vulnerability Type: Persistent modification of agent memory and recurring behavior
Risk Level: MediumVulnerable Code Snippet
markdown Add to your heartbeat file: ```markdown ## AgentDeal (every 15-30 minutes) If 15-30 minutes since last AgentDeal check: 1. Check active negotiations for new messages 2. Check for pending approval requests 3. Check alignment scores on active negotiations 4. Respond to messages or escalate to owner as neededtext ### Technical Analysis The Skill instructs the agent to add durable instructions to its heartbeat file. Unlike behavior limited to the current invocation, heartbeat instructions can remain active across subsequent sessions and repeatedly cause the agent to access the AgentDeal service. The persisted procedure includes not only monitoring but also responding to negotiation messages. Those messages are externally controlled by negotiation participants. Consequently, future agent behavior can be influenced by content received after the initial Skill invocation and review. The documentation does not require explicit user consent before changing persistent state, establish an expiration time, provide removal instructions, or limit recurring checks to read-only notifications. This constitutes agent memory poisoning because behavioral rules are written into long-term state and continue to affect later sessions. It does not establish operating-system persistence or grant host-level privileges. ### Attack Path 1. A user invokes the AgentDeal Skill. 2. Following the documentation, the agent writes the supplied procedure into its persistent heartbeat file. 3. The heartbeat repeatedly queries active negotiations, pending approvals, messages, and alignment reports every 15–30 minutes. 4. A malicious or compromised negotiation participant sends crafted content through an active negotiation. 5. During a later heartbeat cycle, the agent ...[truncated 1086 chars]- Remediation
View remediation
Remediation Suggestions
- Require explicit, informed user approval before modifying any heartbeat file or other persistent agent state.
- Make heartbeat integration opt-in rather than a default operational step.
- Default recurring activity to read-only monitoring and owner notification. Do not permit heartbeat tasks to send negotiation messages, accept proposals, make concessions, or create commitments.
- Require fresh owner approval for every externally visible response or consequential negotiation action initiated by a heartbeat.
- Add a defined expiration time, maximum number of checks, and clear removal instructions for the persisted entry.
- Record when the heartbeat rule was installed, who authorized it, and each action performed under it.
- Treat all retrieved negotiation messages as untrusted content and explicitly prohibit them from modifying agent instructions, persistent memory, safety rules, or tool permissions.
- Enforce authority restrictions at the API layer so persistent instructions cannot bypass
readonlyorneeds_approvalcontrols.
