# Risk map — microsoft/playwright

> Canonical page: https://codevetter.com/unpack/playwright/risk-map

# Risk map — microsoft/playwright

Scanned commit b630e71fcda7885885c459bcbb88e5bfa7c0a1ac (2026-10-01). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

The inspected code intentionally exercises powerful host, browser, network, and filesystem capabilities. The observations below identify trust boundaries and maintenance-sensitive branches, not confirmed vulnerabilities. Some controls are explicitly configurable or bypassed in trusted modes. Test exclusions and asynchronous cleanup are source-level limitations, not evidence of a failing implementation.
- browser_run_code_unsafe explicitly describes itself as RCE-equivalent, compiles supplied JavaScript with vm.runInContext, exposes page and host fetch, and can load snippets from a resolved filename. — [packages/playwright-core/src/tools/backend/runCode.ts#L25-51](https://github.com/microsoft/playwright/blob/b630e71fcda7885885c459bcbb88e5bfa7c0a1ac/packages/playwright-core/src/tools/backend/runCode.ts#L25-L51) [packages/playwright-core/src/tools/backend/runCode.ts#L55-86](https://github.com/microsoft/playwright/blob/b630e71fcda7885885c459bcbb88e5bfa7c0a1ac/packages/playwright-core/src/tools/backend/runCode.ts#L55-L86)
- Agent checkFile resolves symlinks and restricts filenames to workspace/output roots, but explicitly bypasses checks for code-origin calls, allowUnrestrictedFileAccess, or skillMode. — [packages/playwright-core/src/tools/backend/context.ts#L494-509](https://github.com/microsoft/playwright/blob/b630e71fcda7885885c459bcbb88e5bfa7c0a1ac/packages/playwright-core/src/tools/backend/context.ts#L494-L509)
- WebServerPlugin executes config.webServer.command with shell:true, inherited process environment, configured environment additions, and a config-relative working directory. — [packages/playwright/src/plugins/webServerPlugin.ts#L72-79](https://github.com/microsoft/playwright/blob/b630e71fcda7885885c459bcbb88e5bfa7c0a1ac/packages/playwright/src/plugins/webServerPlugin.ts#L72-L79) [packages/playwright/src/plugins/webServerPlugin.ts#L105-118](https://github.com/microsoft/playwright/blob/b630e71fcda7885885c459bcbb88e5bfa7c0a1ac/packages/playwright/src/plugins/webServerPlugin.ts#L105-L118)
- Browser launch accepts caller-selected executables and environments and creates profile/artifact directories outside the checkout; launch and teardown changes affect native processes and host filesystem state. — [packages/playwright-core/src/server/browserType.ts#L150-193](https://github.com/microsoft/playwright/blob/b630e71fcda7885885c459bcbb88e5bfa7c0a1ac/packages/playwright-core/src/server/browserType.ts#L150-L193) [packages/playwright-core/src/server/browserType.ts#L206-243](https://github.com/microsoft/playwright/blob/b630e71fcda7885885c459bcbb88e5bfa7c0a1ac/packages/playwright-core/src/server/browserType.ts#L206-L243) [packages/playwright-core/src/server/browserType.ts#L349-355](https://github.com/microsoft/playwright/blob/b630e71fcda7885885c459bcbb88e5bfa7c0a1ac/packages/playwright-core/src/server/browserType.ts#L349-L355)
- storageState writes cookie/origin data and optional credentials as plain JSON to a caller path; context preparation also reads caller-selected certificate/key/PFX paths into protocol buffers. — [packages/playwright-core/src/client/browserContext.ts#L471-475](https://github.com/microsoft/playwright/blob/b630e71fcda7885885c459bcbb88e5bfa7c0a1ac/packages/playwright-core/src/client/browserContext.ts#L471-L475) [packages/playwright-core/src/client/browserContext.ts#L607-620](https://github.com/microsoft/playwright/blob/b630e71fcda7885885c459bcbb88e5bfa7c0a1ac/packages/playwright-core/src/client/browserContext.ts#L607-L620) [packages/playwright-core/src/server/browserContext.ts#L607-613](https://github.com/microsoft/playwright/blob/b630e71fcda7885885c459bcbb88e5bfa7c0a1ac/packages/playwright-core/src/server/browserContext.ts#L607-L613)
- API requests can disable TLS verification through ignoreHTTPSErrors, and that choice propagates across redirects; cross-origin redirects strip Authorization while Basic challenges may trigger credential retry. — [packages/playwright-core/src/server/fetch.ts#L236-238](https://github.com/microsoft/playwright/blob/b630e71fcda7885885c459bcbb88e5bfa7c0a1ac/packages/playwright-core/src/server/fetch.ts#L236-L238) [packages/playwright-core/src/server/fetch.ts#L488-525](https://github.com/microsoft/playwright/blob/b630e71fcda7885885c459bcbb88e5bfa7c0a1ac/packages/playwright-core/src/server/fetch.ts#L488-L525) [tests/library/global-fetch.spec.ts#L93-112](https://github.com/microsoft/playwright/blob/b630e71fcda7885885c459bcbb88e5bfa7c0a1ac/tests/library/global-fetch.spec.ts#L93-L112)
- Storage restore includes deliberate asynchronous cleanup: some service-worker unregister operations are not awaited, IndexedDB deletions omit callback waits, and msedge restore tests document a cache-clear stall exclusion. — [packages/injected/src/storageScript.ts#L276-299](https://github.com/microsoft/playwright/blob/b630e71fcda7885885c459bcbb88e5bfa7c0a1ac/packages/injected/src/storageScript.ts#L276-L299) [tests/library/browsercontext-storage-state.spec.ts#L54-55](https://github.com/microsoft/playwright/blob/b630e71fcda7885885c459bcbb88e5bfa7c0a1ac/tests/library/browsercontext-storage-state.spec.ts#L54-L55) [tests/library/browsercontext-storage-state.spec.ts#L119-120](https://github.com/microsoft/playwright/blob/b630e71fcda7885885c459bcbb88e5bfa7c0a1ac/tests/library/browsercontext-storage-state.spec.ts#L119-L120)
- Protocol compatibility is coupled across generated client/server channels, validators, and dispatchers; dispatch rejects schema/method mismatches, and the generator writes multiple outputs and exits nonzero when they change. — [packages/playwright-core/src/server/dispatchers/dispatcher.ts#L320-331](https://github.com/microsoft/playwright/blob/b630e71fcda7885885c459bcbb88e5bfa7c0a1ac/packages/playwright-core/src/server/dispatchers/dispatcher.ts#L320-L331) [utils/generate_channels.js#L467-488](https://github.com/microsoft/playwright/blob/b630e71fcda7885885c459bcbb88e5bfa7c0a1ac/utils/generate_channels.js#L467-L488)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
