T06 · System Persistence
- Location
references/schedule-config.md:11- Finding
Persistent Scheduled Execution Through Root-Scoped Cron Jobs
- Content
View full analysis
Vulnerability Details
File Location:
references/schedule-config.md, lines 11–46
Vulnerability Type: Persistent scheduled-task registration
Risk Level: HighThe setup instructions direct the agent to create recurring cron jobs that execute a script from a root-scoped directory:
bash 0 8 * * * /root/.openclaw/scripts/cet4-reminder.sh 0 21 * * * /root/.openclaw/scripts/cet4-reminder.shThe instructions also use the following command to detect an existing persistent task:
bash crontab -l | grep cet4Technical Analysis
The scheduled reminders are related to the declared learning-reminder functionality, but direct modification of
crontabcreates execution that persists across agent sessions and system restarts. This exceeds the privileges needed for vocabulary learning and progress tracking, particularly because the configured executable is located under/root.The document does not specify:
- Explicit confirmation immediately before changing the user's crontab.
- Use of an unprivileged service account.
- Ownership and permission validation for the reminder script.
- Integrity verification before each execution.
- Safe and idempotent installation or removal procedures.
- Validation that an existing matching entry belongs to this Skill.
- Restrictions preventing duplicate or attacker-controlled cron entries.
The command
crontab -l | grep cet4is also an insufficient ownership check. Any unrelated or attacker-created entry containingcet4could be mistaken for the expected task, while legitimate entries without that literal string could be missed.Although the Skill discloses reminder scheduling as a feature, disclosure does not eliminate the security implications of persistent execution. The package itself does not contain the referenced reminder script, so its eventual content and integrity cannot be established from the audited project.
Attack Path
- A us ...[truncated 1564 chars]
- Remediation
View remediation
Remediation Suggestions
- Do not modify system or user crontabs automatically. Prefer a user-scoped, application-native reminder facility.
- Require explicit, informed confirmation immediately before creating any persistent task, including the exact schedule, executable path, recipient, and account that will run it.
- Never use root for this functionality. Create reminders under a dedicated unprivileged account with only the permissions required to read learning schedules and send the intended notification.
- Store the reminder executable in a fixed, non-user-writable location. Validate its canonical path, owner, permissions, and integrity before registration and execution.
- Ship and audit the reminder implementation with the Skill rather than referencing an absent external script.
- Use a unique, structured task identifier instead of
grep cet4, and compare the complete expected entry before adding or changing it. - Make installation idempotent and prevent duplicate entries.
- Provide a documented removal command and automatically remove the task when reminders are disabled or the Skill is uninstalled.
- Validate the message recipient and avoid relying implicitly on a default messaging account.
- If cron remains necessary, write a narrowly scoped wrapper that uses absolute paths, a restricted environment, safe permissions, controlled logging, and no interpretation of untrusted schedule or recipient values as shell syntax.
