T09 · Insecure Skill Coding Practices
Error
- Location
- fetcher.js:85
- Finding
- Chromium Sandbox Disabled While Rendering Untrusted Remote Content<![CDATA[ ## Vulnerability Details **File Location**: `fetcher.js:85-95` **Vulnerability Type**: Unsafe browser isolation configuration **Risk Level**: High ```javascript browser = await puppeteer.launch({ headless: true, executablePath: '/usr/bin/chromium', args: ['--no-sandbox', '--disable-setuid-sandbox', '--disable-dev-shm-usage', '--disable-gpu'] }); const page = await browser.newPage(); await page.setViewport({ width: 1280, height: 800 }); await page.setUserAgent('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36'); await page.goto(url, { waitUntil: 'networkidle2', timeout: 30000 }); ``` ### Technical Analysis The Skill launches Chromium with both `--no-sandbox` and `--disable-setuid-sandbox`, disabling critical Chromium security boundaries. It then navigates to externally controlled news websites and loads their active content, including JavaScript and potentially third-party advertisements, redirects, and embedded resources. A browser sandbox is designed to contain a compromised renderer and prevent it from directly exercising the filesystem, operating-system interfaces, and other resources available to the browser process. Disabling it does not itself execute malicious code, but it significantly increases the consequences of a Chromium vulnerability. External network access is necessary for the declared news-fetching functionality. Removing browser isolation is not necessary, particularly because the project also contains an RSS-based implementation that does not render active web content. ### Attack Path 1. An attacker compromises a configured news source, advertising network, analytics resource, or another third-party resource loaded by that source. 2. The Skill invokes `fetchSource()` and navigates Chromium to the affected page. 3. The page delivers JavaScript or other browser content crafted to exploit a vulnerability in the installed Chromium version. 4. The exploit compromises a Chromium renderer or related browser ...[truncated 1224 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove `--no-sandbox` and `--disable-setuid-sandbox` from the Chromium launch arguments. 2. Run Chromium as a dedicated, unprivileged operating-system user with its supported sandbox enabled. 3. Prefer the RSS-based implementation in `scripts/news.py` where browser rendering is unnecessary. 4. If browser rendering remains required, execute it in a hardened container or equivalent isolation boundary with: - A read-only root filesystem. - No host filesystem mounts containing sensitive data. - Dropped Linux capabilities. - No privileged container mode. - Strict CPU, memory, process, and execution-time limits. - Network egress restricted to explicitly approved news domains. 5. Intercept browser requests and block unnecessary third-party scripts, advertisements, trackers, downloads, and non-HTTP(S) schemes. 6. Keep Chromium and Puppeteer on supported, security-patched releases. The lockfile identifies Puppeteer `23.11.1` as deprecated and no longer supported. 7. Where possible, disable JavaScript and retrieve only static document content, or parse RSS/Atom feeds instead of executing website content. ]]>
