Skip to content

How does sandboxing and process isolation work in WebViews? #2

Open

Description

@NiklasMerz

Do we add it to the report? Does anyone know if and how it works in WebViews?

Activity

  1. NiklasMerz commented on Jul 9, 2026

    @NiklasMerz
    MemberAuthor

    By @erisu

    @abstract Security restriction modes for WebView content.
     @constant WKSecurityRestrictionModeNone No additional security restrictions beyond WebKit defaults.
     @constant WKSecurityRestrictionModeMaximizeCompatibility Enhanced security protections optimized for maintaining web compatibility. Disables JIT compilation and enables increased MTE adoption.
     @constant WKSecurityRestrictionModeLockdown Maximum security restrictions including feature disablement. Applied automatically by the system in Lockdown Mode.
    

    https://github.com/WebKit/webkit/blob/main/Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferences.h#L119-128

    Security restriction modes provide different levels of security hardening for high-risk browsing contexts.
     WKSecurityRestrictionModeMaximizeCompatibility provides additional hardening while maintaining full web compatibility:

    JavaScript JIT compilation disabled (interpreter-only execution)
    Increased Memory Tagging Extension (MTE) coverage across allocations in the WebContent process
     Setting a security restriction mode creates separate, isolated WebContent processes for the specified protection level.
     This preference only applies to main frame navigations and will be ignored for subframe navigations. When set for a main frame, all subframe content and opened windows inherit the same security restrictions.
     When the system has chosen WKSecurityRestrictionModeLockdown (e.g., in Lockdown Mode), attempts to set a less restrictive mode will fail silently.
     The default value is WKSecurityRestrictionModeNone.

  2. peterbn commented on Jul 28, 2026

    @peterbn

    Android WebView uses a single separate renderer process https://chromium.googlesource.com/chromium/src/+/HEAD/android_webview/renderer/README.md#out_of_process-renderer

    If the application creates multiple Profiles (equivalent to user profiles in Chrome-based browsers), then each profile has a spearate renderer process: https://chromium.googlesource.com/chromium/src/+/HEAD/android_webview/renderer/README.md#multiple-renderers

  3. NiklasMerz commented on Jul 31, 2026

    @NiklasMerz
    MemberAuthor

    Thank you @peterbn for the info and pointers to the docs. I added an Android example in #6. Feel free to leave a review.

    Everyone please also check out #7 for a short description of Sandboxing/Process isolation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions