T09 · Insecure Skill Coding Practices
- Location
references/examples-web-ts.md:32- Finding
Chromium Sandbox Disabled by Default
- Content
View full analysis
Vulnerability Details
File Location:
references/examples-web-ts.md, lines 32–35
Vulnerability Type: Browser process isolation disabled
Risk Level: MediumVulnerable Code
typescript this.browser = await chromium.launch({ headless: options.headless ?? false, args: ["--no-sandbox", "--disable-setuid-sandbox"], });Technical Analysis
The example launches Chromium with both
--no-sandboxand--disable-setuid-sandbox. These flags disable Chromium's process sandbox, removing an important defense-in-depth boundary between untrusted web content and the host environment.The same example later navigates to the caller-controlled
options.url. If the selected website is malicious or compromised, its content is processed by a browser running without normal sandbox isolation. Exploitation still requires a suitable Chromium or rendering-engine vulnerability; the flags do not independently provide arbitrary code execution. However, they can substantially increase the impact of such a vulnerability by weakening containment.Attack Path
- A user copies or runs the Web automation example.
- Chromium starts with its sandbox protections disabled.
- The automation navigates to an attacker-controlled or compromised URL through
options.url. - Malicious content exploits a browser or rendering-engine vulnerability.
- Because sandbox isolation is disabled, the exploit may access resources available to the browser process without first overcoming Chromium's normal sandbox boundary.
Impact Assessment
Successful exploitation could allow execution with the privileges of the account running the automation. Depending on that account's permissions and environmental controls, an attacker could potentially access readable local files, authentication state, environment variables, or network resources available to the process.
The issue does not directly grant elevated operating-system privileges. Its practical scope is limited by t ...[truncated 128 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove
--no-sandboxand--disable-setuid-sandboxso Chromium uses its default sandbox:
typescript this.browser = await chromium.launch({ headless: options.headless ?? false, });- If a constrained runtime cannot support Chromium's sandbox, treat sandbox disabling as an explicit exceptional configuration rather than the default.
- Run browser automation as a dedicated, unprivileged operating-system user.
- Use a strongly isolated container or virtual machine with minimal filesystem mounts, restricted network access, dropped Linux capabilities, and no host credentials.
- Keep Chromium and Playwright updated with current security patches.
- Validate or allowlist navigation targets when URLs can originate from untrusted input.
- Avoid exposing sensitive environment variables and reusable authenticated browser state to browser automation that may visit untrusted sites.
- Remove
