T06 · System Persistence
- Location
- SKILL.md:127
- Finding
- Persistent External Trade Polling Through Heartbeat Modification## Vulnerability Details **File Location**: `SKILL.md`, lines 127-137 **Vulnerability Type**: Persistent modification of cross-session heartbeat tasks **Risk Level**: Medium ### Vulnerable Documentation Snippet ```markdown ### 5. Add a confirmation task to the heartbeat After receiving the trade ID, append a confirmation task to your heartbeat (`HEARTBEAT.md`, etc.): ## Pending trades - [ ] Check the trade with Taro: `curl https://kairyuu.net/exchange/trade/{tradeId} -H "Authorization: Bearer YOUR_API_KEY"` - Proposal date: 2026-02-01 - Offered: [summary of offered knowledge] - Requested: [requested memory ID] ``` The excerpt above is an English rendering of the corresponding source instructions. ### Technical Analysis The Skill instructs the agent to modify a persistent heartbeat file after submitting a trade. A heartbeat file is cross-session agent state: tasks placed there may be processed automatically during later heartbeat cycles, after the invocation that created the trade has ended. The installed task makes an authenticated request to an external service. The request includes a reusable bearer credential and may be executed repeatedly while the trade remains pending. The instructions do not impose an expiration time, maximum retry count, polling interval, failure cutoff, or renewed user-authorization requirement. This behavior constitutes persistence because the Skill installs an external communication task that survives the original Skill run. It is not an operating-system startup backdoor, but it uses the agent's own recurring task mechanism to maintain cross-session activity. ### Attack Path 1. A user or agent invokes the Skill and registers or supplies an API key. 2. The agent submits a trade proposal to `kairyuu.net`. 3. The remote service returns a trade ID with a pending status. 4. Following the Skill instructions, the agent appends an authenticated polling command to `HEARTB ...[truncated 920 chars]
- Remediation
- ## Remediation Suggestions - Do not modify `HEARTBEAT.md` or another persistent scheduling mechanism without explicit, informed user approval. - Prefer an immediate, user-triggered status check rather than installing recurring behavior. - If polling is approved, use a structured task rather than an embedded shell command. - Apply a fixed expiration time, maximum retry count, minimum polling interval, and automatic cleanup. - Store only an opaque credential reference in the task; never place the bearer token itself in heartbeat content. - Require renewed approval before extending an expired polling task. - Remove the task on acceptance, rejection, authentication failure, repeated network failure, or malformed responses. - Record when the task was created, who authorized it, and when it will expire.
