Repository navigation
fix: inherit nodeIntegrationInWorker from the embedder for <webview> and window.open - #52823
Merged
MarshallOfSound merged 1 commit intoAug 15, 2026
Merged
Conversation
…and window.open The list of security options a <webview> guest always inherits from its embedder, and the equivalent list child windows inherit from their parent, omitted nodeIntegrationInWorker. As a result the webpreferences attribute could set nodeIntegrationInWorker on a guest whose embedder had it disabled, giving the guest's dedicated workers a Node environment the embedder itself did not grant (and, with an unsandboxed embedder, dropping the guest out of the sandbox). Add nodeIntegrationInWorker to both inheritance lists so a guest can never be less secure than its embedder for this option.
MarshallOfSound
force-pushed
the
fix/webview-inherit-node-integration-in-worker
branch
from
August 15, 2026 21:35
a278ce7 to
f79f45b
Compare
codebytere
approved these changes
Aug 15, 2026
MarshallOfSound
enabled auto-merge (squash)
August 15, 2026 21:49
VerteDinde
approved these changes
Aug 15, 2026
MarshallOfSound
deleted the
fix/webview-inherit-node-integration-in-worker
branch
August 15, 2026 23:05
|
Release Notes Persisted
|
This was referenced Aug 15, 2026
Contributor
|
I have automatically backported this PR to "41-x-y", please check out #52829 |
Contributor
|
I have automatically backported this PR to "43-x-y", please check out #52830 |
Contributor
|
I have automatically backported this PR to "42-x-y", please check out #52831 |
Contributor
|
I have automatically backported this PR to "44-x-y", please check out #52832 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
<webview>guest-inheritance list clamps a guest to be no less restricted than its embedder fornodeIntegration,contextIsolation,sandbox, and friends, butnodeIntegrationInWorkerwas missing — so awebpreferences="nodeIntegrationInWorker=1"attribute was honoured even when the embedder had it off.nodeIntegrationInWorkerwas also absent fromgetLastWebPreferences(), so the inheritance check had nothing to compare against.nodeIntegrationInWorkerto the inherited web preferences for<webview>(and the equivalentwindow.openlist).nodeIntegrationInWorkerfromSaveLastPreferences()so it round-trips throughgetLastWebPreferences(), matchingnodeIntegration.<webview>inheritance behaviour; add regression coverage.Notes:
<webview>andwindow.opennow inheritnodeIntegrationInWorkerfrom the embedder, consistent with the other Node and sandbox preferences.