Skip to content

fix(browse): enable Chromium sandbox in headed mode#1551

Closed
GolfFry wants to merge 1 commit into
garrytan:mainfrom
GolfFry:fix/headed-chromium-sandbox
Closed

fix(browse): enable Chromium sandbox in headed mode#1551
GolfFry wants to merge 1 commit into
garrytan:mainfrom
GolfFry:fix/headed-chromium-sandbox

Conversation

@GolfFry
Copy link
Copy Markdown

@GolfFry GolfFry commented May 16, 2026

The two headed launchPersistentContext() call sites in BrowserManager omitted the chromiumSandbox option, so Playwright defaulted to passing --no-sandbox even on macOS and Linux where the sandbox works correctly. Chromium then displays the yellow "unsupported command-line flag — security will suffer" info bar, and any renderer exploit (V8, Skia, libwebp, …) can escape straight to the user's account.

The headless launch() path at line 179 already passes chromiumSandbox: process.platform !== 'win32'. This brings the two headed sites in line — preserving the Windows exemption (where the Bun→Node spawn chain breaks the sandbox, per GitHub #276).

The two headed launchPersistentContext() call sites in BrowserManager
omitted the chromiumSandbox option, so Playwright defaulted to passing
--no-sandbox even on macOS and Linux where the sandbox works correctly.
Chromium then displays the yellow "unsupported command-line flag —
security will suffer" info bar, and any renderer exploit (V8, Skia,
libwebp, …) can escape straight to the user's account.

The headless launch() path at line 179 already passes
`chromiumSandbox: process.platform !== 'win32'`. This brings the two
headed sites in line — preserving the Windows exemption (where the
Bun→Node spawn chain breaks the sandbox, per GitHub garrytan#276).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@garrytan
Copy link
Copy Markdown
Owner

Thanks @GolfFry — headed-mode Chromium sandbox shipped in v1.42.2.0 (#1629). Closing as superseded.

@garrytan garrytan closed this May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants