T05 · Unauthorized Access and Privilege Escalation
- Location
- SKILL.md:15
- Finding
- Overbroad Chromium Process Termination## Vulnerability Details **File Location**: `SKILL.md:15` **Vulnerability Type**: Improper process scoping and violation of least privilege **Risk Level**: Medium ### Vulnerable Code ```bash pkill -f chromium ``` ### Technical Analysis The documented cleanup command uses `pkill -f`, which matches the supplied pattern against the complete command line of every process visible to the invoking account. It is not restricted to Chromium processes started by this Skill, a particular browser session, or a recorded process ID. Consequently, running the prescribed cleanup can terminate unrelated Chromium instances and any other process whose command line happens to contain `chromium`. The command exercises broader process-control authority than is necessary to clean up the Skill's own browser session. ### Attack Path 1. Another user task, automation job, or service starts Chromium under the same operating-system account. 2. The Skill performs a browser-automation task. 3. The operator or agent follows the cleanup instruction and executes `pkill -f chromium`. 4. The pattern matches both the Skill's browser and unrelated Chromium processes. 5. All matching processes accessible to the caller are terminated without checking ownership by the current Skill invocation. No additional privilege escalation is demonstrated; exploitation is limited to processes the invoking account already has permission to signal. ### Impact Assessment The command can cause denial of service, interruption of unrelated tests or automation, loss of unsaved browser data, and termination of active browsing sessions. The affected scope consists of all matching processes that the executing account is authorized to terminate, rather than only the process created for the current task.
- Remediation
- ## Remediation Suggestions - Replace global process matching with session-aware cleanup: ```bash agent-browser --session "$SESSION_NAME" close ``` - Assign a unique session name to every independent task and close only that session. - If process-level cleanup is unavoidable, record the PID of the process created by the current invocation, validate that it still belongs to the expected executable and user, and signal only that PID. - Use a cleanup trap in executable workflows so targeted cleanup occurs even when a command fails. - Do not use `pkill -f` for routine browser cleanup.
