Medium CVSS 7.5 webkit Bypass 🔧 Commit mapped

Overview

Medium
Severity
7.5
CVSS
No
Exploited ITW
Fixed
Fix Status
DescriptionProcessing maliciously crafted web content may disclose sensitive user information
ComponentWebKit UIProcess
Bug ClassBypass
Tracker309698
Fix commitc6cd4e07e9af (WebKit/WebKit) +148/-4
CWECWE-200 (Information exposure)
CVSS vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CISA KEVNot listed
CreditedLuke Francis, Vaagn Vardanian, kwak kiyong / kakaogames, Vitaly Simonovich, Adel Bouachraoui, greenbynox
Disclosed2026-05-11

Background

Attachment elements
WebKit’s <attachment> support (ENABLE(ATTACHMENT_ELEMENT)) for embedding file attachments, which can carry local file paths for upload.
WebPasteboardProxy
The UI-process side of pasteboard IPC that vends pasteboard data (including file paths) to the WebContent process.
Allow-list of vended paths
The set of file paths the UI process actually provided; incoming paths from WebContent must be checked against it.
Sandbox extension
A token the UI/Network process grants so a sandboxed process may access a specific file; must only be issued for legitimately vended paths.

Root Cause Analysis

With attachment elements enabled, WebPasteboardProxy (UI process) returns file paths (pathsForFileUpload) obtained from the pasteboard to the WebContent process, but it did not record which paths it had legitimately vended — ‘Missing validation for incoming file paths from web content process when attachment elements are enabled’. Without an allow-list, a malicious or compromised WebContent process could later reference arbitrary file paths (including path-traversal outside the intended files) in attachment/file operations, and the trusted UI/Network process would act on them, disclosing sensitive local files.

The fix adds addAllowedAttachmentFilePaths() and invokes it on every path that vends pasteboard file paths — getPasteboardPathnamesForType, allPasteboardItemInfo (including the iOS HEIC-transcoding continuation, which now captures the IPC::Connection by Ref so the async main-thread hop can still register paths), and informationForItemAtIndex — registering each vended path through WebProcessProxy::addAllowedAttachmentFilePath.

The restored invariant is that the WebContent process may only reference attachment file paths the UI process actually provided, so incoming paths can be validated against this per-process allow-list. INFERENCE: the enforcement check that rejects non-allow-listed incoming paths (the consumer of addAllowedAttachmentFilePath) is outside this hunk; the diff establishes population of the allow-list.

Key insight
File paths that cross from WebContent to the UI process for attachments must be validated against what the UI process actually vended; trusting web-process-supplied paths permits traversal to arbitrary local files.

Attack Path

  1. Enable attachment elements and compromise WebContent On a build with ENABLE(ATTACHMENT_ELEMENT), the attacker controls (or compromises) a WebContent process that speaks the pasteboard/attachment IPC.
  2. Send an arbitrary file path over IPC WebContent references a file path it never legitimately received (e.g. a path-traversal to a sensitive file) in an attachment/file-upload operation.
  3. UI/Network process trusts the path Pre-patch, with no allow-list of vended paths, the trusted process accepts the incoming path and grants access / creates a sandbox extension for it.
  4. Disclose sensitive local files The contents of files outside the intended set are exposed to web content, disclosing sensitive user information.

Impact Assessment

This is a local-file information-disclosure / path-traversal issue across the WebContent->UI process boundary, not a memory-safety bug. It requires attachment elements to be enabled and a WebContent process willing to send crafted IPC (a malicious or already-compromised web process), so it is a defense-in-depth boundary hardening rather than a direct remote primitive; its payoff is reading files outside the intended attachment set.

Changed Functions

FunctionChangeNotes
addAllowedAttachmentFilePaths
Source/WebKit/UIProcess/Cocoa/WebPasteboardProxyCocoa.mm
added Helper (guarded by ENABLE(ATTACHMENT_ELEMENT)) that registers each vended path via WebProcessProxy::addAllowedAttachmentFilePath for the page's web process.
WebPasteboardProxy::getPasteboardPathnamesForType
Source/WebKit/UIProcess/Cocoa/WebPasteboardProxyCocoa.mm
modified Registers the pathnames it returns to WebContent as allowed attachment file paths.
WebPasteboardProxy::allPasteboardItemInfo
Source/WebKit/UIProcess/Cocoa/WebPasteboardProxyCocoa.mm
modified Registers pathsForFileUpload on every return path, including the iOS HEIC-transcoding continuation, which now captures the IPC::Connection by Ref so the async main-thread dispatch can still allow-list the paths.
WebPasteboardProxy::informationForItemAtIndex
Source/WebKit/UIProcess/Cocoa/WebPasteboardProxyCocoa.mm
modified Registers the item's pathsForFileUpload as allowed attachment file paths before returning them to WebContent.

Files Changed

  • Source/WebKit/UIProcess/Cocoa/WebPasteboardProxyCocoa.mm
  • Source/WebKit/UIProcess/WebPageProxy.cpp
  • Source/WebKit/UIProcess/WebProcessProxy.cpp
  • Source/WebKit/UIProcess/WebProcessProxy.h
  • Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKAttachmentTests.mm

Audit Directions

  • Other IPC accepting file paths from WebContent
    Audit UI/Network-process IPC endpoints that receive file paths or create SandboxExtension handles from WebContent-supplied strings without checking an allow-list; the tell is SandboxExtension::createHandle(pathFromWebProcess, …).
  • Attachment / file-upload path flows
    Trace pathsForFileUpload and attachment file paths end-to-end and confirm every consumer validates against addAllowedAttachmentFilePath (the allow-list this commit populates).
  • Async IPC continuations dropping the connection
    Look for async transcoding/dispatch continuations that previously dropped the IPC::Connection; ensure they capture it (by Ref) so per-connection allow-listing/validation still runs on the main-thread hop.
diff --git a/Source/WebCore/platform/audio/ios/MediaDeviceRouteController.mm b/Source/WebCore/platform/audio/ios/MediaDeviceRouteController.mm
index 77ece021b66d..bafd2772a91a 100644
--- a/Source/WebCore/platform/audio/ios/MediaDeviceRouteController.mm
+++ b/Source/WebCore/platform/audio/ios/MediaDeviceRouteController.mm
@@ -31,10 +31,12 @@
 
 #if ENABLE(WIRELESS_PLAYBACK_MEDIA_PLAYER)
 
+#import "Logging.h"
 #import "MediaDeviceRoute.h"
 #import "MediaSessionHelperIOS.h"
 #import "MediaStrategy.h"
 #import "PlatformStrategies.h"
+#import <wtf/darwin/DispatchExtras.h>
 #import <WebKitAdditions/MediaDeviceRouteControllerAdditions.mm>
 
 #import <pal/ios/AVRoutingSoftLink.h>
Loading diff…

Original Bug Report

The reporter's bug is still restricted on the tracker.