T06 · System Persistence
- Location
EXAMPLES.md:112- Finding
User-Mediated Installation of a Persistent Scheduled Agent Task
- Content
View full analysis
Vulnerability Details
File Location:
EXAMPLES.md:112-116; related command construction insetup_and_test.py:190-200
Vulnerability Type: Persistent scheduled execution
Risk Level: MediumEvidence
bash openclaw cron add --name "weekly-context-optimization" \ --cron "0 2 * * 1" \ --message "[weekly workspace analysis and optimization instruction]" \ --description "[weekly context optimization task]"The source instructs the user to register an OpenClaw cron task that runs every Monday at 02:00. The setup script constructs the same command and directs the user to execute it manually.
Technical Analysis
The documented workflow creates a scheduled OpenClaw task that survives the current skill invocation. Its instruction requests recurring analysis and optimization of workspace context and extraction of new skills. Those operations can affect persistent Agent control files, including
AGENTS.md,SOUL.md,MEMORY.md, andHEARTBEAT.md.The setup script does not automatically execute the
cron addcommand; therefore, exploitation requires the user to follow the printed or documented installation instructions. Nevertheless, once installed, the task establishes cross-session behavior without requiring a new task-specific authorization each week.Attack Path
- A user installs the skill and follows the scheduling instructions in
EXAMPLES.mdorsetup_and_test.py. - The user executes the generated
openclaw cron addcommand. - OpenClaw stores a weekly scheduled task.
- On each scheduled run, the Agent receives an instruction to analyze and optimize workspace files and extract skills.
- If the invoked optimizer supports modification, persistent Agent context may be changed without fresh approval.
Impact Assessment
The resulting task persists across sessions and may repeatedly operate on Agent configuration, identity, memory, and behavioral files. Its effective p ...[truncated 225 chars]
- A user installs the skill and follows the scheduling instructions in
- Remediation
View remediation
Remediation Suggestions
- Remove instructions that schedule write-capable optimization tasks by default.
- Restrict any scheduled task to read-only analysis and report generation.
- Require explicit interactive approval before modifying context files or creating new skills.
- Display the exact files and proposed changes before each write.
- Add expiration, disable, and removal instructions for scheduled tasks.
- Record an audit log for every scheduled invocation and resulting file change.
- Use an allowlist of approved files rather than a broad workspace operation.
