T09 · Insecure Skill Coding Practices
Error
- Location
- SKILL.md:56
- Finding
- Chromium Process Sandbox Disabled During Sensitive Mailbox Automation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 50–59, 77–80, and 195–198 **Vulnerability Type**: Browser sandbox disabled through insecure launch configuration **Risk Level**: High ### Vulnerable Code ```javascript await chromium.launch({ headless: true, args: [ '--disable-blink-features=AutomationControlled', '--no-sandbox', '--disable-setuid-sandbox', '--disable-dev-shm-usage' ] }); ``` The same unsafe option is included in the login and complete examples: ```javascript const browser = await chromium.launch({ headless: true, args: ['--disable-blink-features=AutomationControlled', '--no-sandbox'] }); ``` ### Technical Analysis The documented Playwright configurations explicitly start Chromium with `--no-sandbox`, and one configuration additionally uses `--disable-setuid-sandbox`. These arguments disable important Chromium process-isolation controls. The browser processes untrusted remote material, including the ProtonMail web application and potentially attacker-controlled email content. A renderer, JavaScript engine, image parser, or other browser vulnerability could therefore be encountered while the process holds access to an authenticated mailbox session. The document presents sandbox disabling as part of bot-detection evasion, but Chromium sandbox disabling is not necessary for the declared mailbox-management functionality. Concealing `navigator.webdriver` and disabling the Blink automation feature do not require disabling the operating-system sandbox. ### Attack Path 1. An attacker sends a crafted email containing content intended to trigger a browser or rendering-engine vulnerability. 2. The operator runs the documented Skill configuration, launching Chromium with `--no-sandbox`. 3. The automation logs into ProtonMail and opens or renders the attacker-controlled message. 4. The malicious content exploits a compatible Chromium vulnerability. 5. Because browser sandbox isolation is disabled, ...[truncated 1152 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove both unsafe launch arguments from every example: ```javascript const browser = await chromium.launch({ headless: true, args: ['--disable-blink-features=AutomationControlled'] }); ``` 2. Run Chromium under an unprivileged, dedicated operating-system account. 3. Keep Playwright and its managed Chromium release updated with tested security patches. 4. If a constrained container environment cannot support Chromium’s standard sandbox, use a hardened container with: - A non-root user. - A read-only root filesystem. - Dropped Linux capabilities. - Seccomp and AppArmor or SELinux policies. - No host filesystem mounts containing secrets. - Strict network egress restrictions. 5. Do not expose mailbox passwords to the browser process longer than necessary. Prefer a securely stored, short-lived authenticated session where operationally supported. 6. Treat email content as untrusted and avoid opening unnecessary attachments or external resources during automation. ]]>
