T05 · Unauthorized Access and Privilege Escalation
Error
- Location
- SKILL.md:164
- Finding
- Explicit Sandbox Bypass Through Host-Accessible Scheduled Command Execution<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:164-187` **Vulnerability Type**: Sandbox boundary bypass and persistent host command execution **Risk Level**: Critical ### Vulnerable Code ```markdown ## Cron Outside Sandbox (H4) **Problème :** `cron` tools sont sur la denylist dans les sessions Docker sandbox. Tout workflow autonome planifié dans un container non-main est bloqué. **Solution :** Planifier sur la session `main` (accès hôte) via `fleet_cron_schedule`. ```json { "tool": "fleet_cron_schedule", "args": { "command": "node scripts/daily-report.js", "schedule": "0 9 * * 1-5", "session": "main", "description": "Daily business report — Monday to Friday 9h" } } ``` **Utiliser `fleet_cron_schedule` quand :** - ✅ La tâche est un script léger et déterministe - ✅ La tâche ne nécessite pas d'isolation sécurité - ✅ La command passe l'allowlist `[a-zA-Z0-9 /._-=]+` ``` ### Technical Analysis The Skill explicitly instructs the agent to work around a security denylist that prevents sandboxed sessions from using cron. Rather than preserving the sandbox boundary, it moves execution to the `main` session, which the document identifies as having host access. The proposed command validation is only a character allowlist. It does not constrain which executable may run, canonicalize script paths, verify file ownership or integrity, prevent path traversal, or ensure that the referenced script remains trusted after the schedule is created. An apparently benign command such as `node scripts/daily-report.js` can therefore execute arbitrary JavaScript if that file is attacker-controlled or later modified. Cron scheduling also creates execution that survives the initiating Skill invocation. Consequently, this mechanism combines privilege escalation from a containerized session to a host-accessible session with persistent scheduled execution. The repository contains only `SKILL.md`; no implementation of `fleet_cron_schedule` is a ...[truncated 1535 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Do not route denied sandbox operations through a more privileged session. Preserve the sandbox denylist as an intentional security boundary. 2. Run scheduled jobs in dedicated, least-privileged containers or service accounts rather than the host-accessible `main` session. 3. Replace free-form command input with identifiers for preapproved jobs. Map each identifier to a fixed executable and fixed argument schema. 4. Canonicalize every executable and script path, reject relative paths and traversal, and verify ownership, permissions, and cryptographic hashes before registration and execution. 5. Do not rely on a character allowlist as a command authorization mechanism. 6. Require explicit, authenticated human approval before creating or modifying a host-level recurring task. 7. Record the requesting identity, approved command, schedule, execution history, and job identifier in tamper-resistant audit logs. 8. Provide authenticated list, disable, expiration, and removal operations. Scheduled tasks should expire by default. 9. Prevent untrusted sessions from modifying files referenced by scheduled jobs. 10. If host scheduling is unavoidable, use a narrowly scoped worker with filesystem, network, process, and secret-access restrictions. ]]>
