T06 · System Persistence
- Location
SKILL.md:200- Finding
Persistent Daily Execution Through User Crontab
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 200-202
Vulnerability Type: Scheduled-task persistence
Risk Level: Highbash # Configure crontab for daily delivery (crontab -e) # Fetch news every day at 8 AM 0 8 * * * /path/to/news_fetch.sh >> /tmp/daily_news.logTechnical Analysis
The Skill instructs the user to register
news_fetch.shas a recurring cron task. A crontab entry survives the current Agent or Skill session and executes the referenced script every day with the privileges of the account that owns the crontab.Persistent scheduling is not necessary for the Skill's declared core functionality of performing on-demand news API queries. It therefore exceeds the minimum execution lifetime needed for that functionality. The referenced script path is also presented as a placeholder without requirements for ownership, integrity validation, or restrictive permissions. If the resolved script can later be modified or replaced, the cron entry will automatically execute the altered content.
Output is appended to the predictable path
/tmp/daily_news.log. The example provides no permission controls, safe file handling, or log rotation. This can result in uncontrolled log growth and may expose news-query output to other local users depending on the host's permissions and configuration.Attack Path
- A user follows the Skill instructions and edits their crontab.
- The user registers the provided entry with a real path to
news_fetch.sh. - The cron entry remains installed after the Skill and Agent session terminate.
- An attacker or another process capable of modifying or replacing the referenced script changes its contents.
- At the next scheduled time, cron executes the modified script automatically.
- The substituted commands run with the privileges and environment available to the crontab owner.
- Execution output continues to be appended to
/tmp/daily_news.log, poten ...[truncated 774 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the crontab instructions from the default usage flow and keep news retrieval explicitly user-initiated.
- If scheduled delivery is a required optional feature, obtain explicit informed consent before creating any persistent task and clearly explain its execution frequency, privilege context, output destination, and lifetime.
- Do not modify a user's crontab automatically. Provide a command that displays the proposed entry and require the user to install it manually.
- Use an absolute, validated script path in a directory writable only by the owning user or administrator.
- Require restrictive script ownership and permissions, such as preventing group or world write access, before scheduling execution.
- Validate the script's integrity before each execution or deploy an immutable, versioned script where practical.
- Store logs in a private application-specific directory rather than a predictable shared temporary path. Apply restrictive permissions and configure size limits or log rotation.
- Provide explicit removal and verification instructions, including how to delete the cron entry and confirm that no persistent task remains.
- Run the scheduled operation with the least-privileged dedicated account where scheduling is genuinely necessary, and avoid installation under administrative or root accounts.
