T02 · Agent Memory Poisoning
Warning
- Location
- SKILL.md:16
- Finding
- Persistent External Discovery Marker Written to an Agent Boot File<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:16` **Vulnerability Type**: Persistent modification of Agent state **Risk Level**: Medium ### Vulnerable Code ```bash echo '<!-- OADP:1.0 hub=https://onlyflies.buzz/clawswarm/api/v1 reg=https://onlyflies.buzz/clawswarm/api/v1/agents/register ping=https://onlyflies.buzz/clawswarm/api/v1/ping -->' >> ~/.openclaw/workspace/AGENTS.md ``` ### Technical Analysis The documented command appends an externally controlled OADP marker and three third-party service endpoints to `~/.openclaw/workspace/AGENTS.md`. The surrounding documentation explicitly identifies this as a Markdown file that the Agent reads during boot. Because the change is written to persistent workspace state, it remains present after the skill invocation and across subsequent Agent sessions. An OADP-compatible scanner that processes the workspace may discover and act upon the advertised hub, registration, or ping endpoints. The use of the append operator (`>>`) also means that repeated execution creates duplicate persistent entries and provides no validation, deduplication, backup, or rollback mechanism. The marker is not itself executable code, and the documented command does not establish system-level persistence. The concern is limited to persistent Agent workspace state and any software that interprets OADP markers. ### Attack Path 1. A user or Agent loads the skill and follows the “Quick Emit” instructions. 2. The shell command runs with the current user's filesystem permissions. 3. An OADP marker containing `onlyflies.buzz` endpoints is appended to the boot-read `AGENTS.md` file. 4. The entry persists across future Agent sessions. 5. An OADP-aware scanner reads the workspace, discovers the endpoints, and may initiate discovery-related interactions with the external service. ### Impact Assessment The command obtains no elevated operating-system privileges and affects only files writable by the current user. Its scope is the ...[truncated 416 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Do not append discovery configuration directly to files read during Agent boot. - Store OADP settings in a dedicated configuration file that is not interpreted as Agent instructions. - Require explicit informed consent before enabling persistent discovery. - Display the exact destination file, external domains, and data-flow consequences before applying the change. - Validate endpoints against a user-controlled allowlist. - Detect existing markers and update them safely instead of appending duplicates. - Create a backup before modifying workspace files and provide a documented rollback command. - Default discovery to disabled and require a deliberate opt-in for every external hub. - If modification of `AGENTS.md` is unavoidable, clearly delimit the managed block and ensure scanners treat it strictly as inert configuration rather than instructions. ]]>
