Windows: Remove WebView2-specific logic - #2572
Conversation
…uldFilterWebView2 brand override options
[Beta] Generated file diffTime updated: Mon, 30 Mar 2026 11:30:24 GMT Android
File has changed Apple
File has changed Chrome-mv3File has changed FirefoxFile has changed IntegrationFile has changed WindowsFile has changed |
|
This PR requires a manual review and approval from a member of one of the following teams:
|
There was a problem hiding this comment.
Web Compatibility Assessment
-
injected/src/features/ua-ch-brands.js(init()and brand mutation path aroundshimUserAgentDataBrands()/applyBrandMutationsToList()), severity: warning- The PR removes
overrideEdgeandfilterWebView2setting checks and always applies brand mutation for enableduaChBrands. This removes a per-site/per-config rollback lever and changes behavior even when config previously setoverrideEdge: disabled. - This is a compatibility risk because domain-level config can no longer suppress brand modification without fully disabling the feature.
- The PR removes
-
injected/src/features/ua-ch-brands.js(brand append logic inapplyBrandMutationsToList()andgetHighEntropyValuesfullVersionList mutation), severity: warning- Behavior changed from conditional replace/append to unconditional append when
Chromiumis present. - This can change list cardinality/order and can introduce duplicates for some custom
brandNamevalues, which is detectable by strict UA-CH parsers and anti-tamper logic.
- Behavior changed from conditional replace/append to unconditional append when
-
injected/integration-test/ua-ch-brands.spec.js(removedoverride-edge-disabledcase), severity: info- The test that verified the disabled-override path was removed, so there is no integration coverage for backwards-compat handling of legacy config toggles.
Security Assessment
-
injected/src/features/windows-permission-usage.js(removed nested-iframe guard inGeolocation.watchPositionandMediaDevices.getUserMediaproxy paths), severity: error- The previous explicit deny-path for nested frames was a defense for environments where nested iframe mediation was not possible.
- Removing it broadens permission execution in nested frames. If any WebView2-like embedding path still exists, nested third-party frames may keep camera/mic/geolocation access without the native control guarantees that motivated the original guard.
-
injected/src/features/ua-ch-brands.js, severity: info- No direct new message-bridge/origin-validation/global-capture vulnerabilities introduced in this diff.
Risk Level
High Risk — this PR changes runtime behavior of injected API overrides (userAgentData and permission proxies) and removes a prior nested-frame permission safety guard, with reduced rollback/test coverage.
Recommendations
- Reintroduce a capability-gated nested-frame permission guard in
windows-permission-usageunless runtime can prove nested frame mediation is supported. - Preserve backward-compatible config control for UA-CH mutation (e.g., temporary alias/migration for
overrideEdgesemantics) so problematic domains can be rolled back quickly. - Add dedupe/order guarantees in
applyBrandMutationsToList()to avoid duplicate brands and keep deterministic UA-CH output contract. - Add integration coverage for nested iframe
watchPosition/getUserMediabehavior and for legacy config compatibility scenarios removed in this PR.
Sent by Cursor Automation: Web compat and sec


Asana Task/Github Issue: https://app.asana.com/1/137249556945/project/72649045549333/task/1213744797153210?focus=true
Description
Windows: Remove WebView2-specific logic from
injected/src/features/ua-ch-brands.jsandinjected/src/features/windows-permission-usage.js.Testing Steps
N/A
Checklist
Please tick all that apply:
Note
Medium Risk
Changes UA-CH brand spoofing and Windows permission instrumentation behavior by removing WebView2-specific filtering/deny paths, which could affect UA-CH output and nested-iframe permission handling on Windows. Risk is moderate because it alters runtime overrides of browser APIs used for privacy/permission signaling.
Overview
Removes WebView2-specific conditionals in Windows injected features.
ua-ch-brandsis simplified to always append the configuredbrandName(defaultDuckDuckGo) using the Chromium version, and no longer supports thefilterWebView2/overrideEdgesettings or Edge/WebView2 brand filtering/replacement logic.windows-permission-usagedrops theisDdgWebView-based nested-iframe detection and stops denyinggeolocation.watchPosition/mediaDevices.getUserMediain that scenario.Related integration coverage for the
overrideEdge: disabledscenario is removed (test page/config and Playwright spec case).Written by Cursor Bugbot for commit b3af1f9. This will update automatically on new commits. Configure here.