XNews

Playwright Clarifies Browser Security: No Bundled Browser, Fixed Test Versions Lack Sandbox

Playwright Clarifies Browser Security: No Bundled Browser, Fixed Test Versions Lack Sandbox

Playwright's official guidance clarifies that its installation packages do not bundle any browser, addressing claims that it ships a vulnerable browser. The guidance explains that Playwright MCP and CLI agents use the local stable Chrome or Edge with sandbox enabled, while the test runner downloads a pinned Chrome for Testing build with the sandbox disabled by default, and recommends using stable Chrome with the sandbox enabled for untrusted pages.

Event version 1.

Key insights

No Bundled Browser

Playwright installation packages do not include any browser, so claims that Playwright ships a vulnerable browser are a misunderstanding.

MCP and CLI Use Stable Browsers

Playwright MCP and command-line agents invoke the local stable Chrome or Edge, which receive normal security updates and have the sandbox enabled by default, requiring no configuration changes.

Test Runner Uses Pinned Chrome for Testing

Running npx playwright install downloads Chrome for Testing, a test-only browser pinned to the version tested by the current Playwright release so that development machines and CI run identical browsers and updates are controlled by Playwright upgrades.

Pinned Browser Trade-offs

The pinned Chrome for Testing may lack the latest Chrome security fixes until the next Playwright release and has the sandbox disabled by default; official guidance limits its use to end-to-end testing of trusted applications and advises against visiting untrusted websites with it.

Library API Defaults and Recommended Configuration

chromium.launch() defaults to the same pinned browser with the sandbox off; code that visits pages outside the user's control, such as crawlers or agent scripts, should switch to stable Chrome with the sandbox enabled via chromium.launch({ channel: 'chrome', chromiumSandbox: true }), and Chrome and Edge should be kept updated because some vulnerabilities can escape the sandbox.

Source posts