CVE-2026-28962
Overview
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.
Attack Path
- 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.
- 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.
- 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.
- Disclose sensitive local files The contents of files outside the intended set are exposed to web content, disclosing sensitive user information.
Impact Assessment
Changed Functions
| Function | Change | Notes |
|---|---|---|
addAllowedAttachmentFilePathsSource/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::getPasteboardPathnamesForTypeSource/WebKit/UIProcess/Cocoa/WebPasteboardProxyCocoa.mm |
modified | Registers the pathnames it returns to WebContent as allowed attachment file paths. |
WebPasteboardProxy::allPasteboardItemInfoSource/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::informationForItemAtIndexSource/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.mmSource/WebKit/UIProcess/WebPageProxy.cppSource/WebKit/UIProcess/WebProcessProxy.cppSource/WebKit/UIProcess/WebProcessProxy.hTools/TestWebKitAPI/Tests/WebKit/WKWebView/WKAttachmentTests.mm
Audit Directions
- Other IPC accepting file paths from WebContentAudit 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 flowsTrace 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 connectionLook 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.
Patch
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>