← All issues

[1] didSameDocumentNavigationForFrame accepts arbitrary URL, enabling address bar spoofing

Severity: High | Component: WebKit UIProcess | 23b15df

renderer가 제공한 문자열을 origin check 없이 표시 URL에 반영하는 UIProcess IPC를 수정한 fix입니다. web content에서 이 경로에 도달하는 것만으로 address bar의 임의 origin을 spoofing할 수 있어 High로 평가합니다.

WebPageProxy::didSameDocumentNavigationForFrameViaJShistory.pushState/replaceState 방식의 navigation 이후, WebContent process가 전달한 임의의 well-formed URL을 그대로 frame의 새 URL로 사용했습니다. 기존의 MESSAGE_CHECK_URL은 URL의 파싱 가능 여부만 검증할 뿐, same-document navigation이 반드시 same-origin이어야 한다는 조건은 전혀 강제하지 않았습니다.

Source/WebKit/UIProcess/WebPageProxy.cpp

Ref process = WebProcessProxy::fromConnection(connection);
MESSAGE_CHECK_URL(process, url);
+ MESSAGE_CHECK(process, url.protocolIsFile() || frame->url().isEmpty() || protocolHostAndPortAreEqual(url, frame->url()));

MESSAGE_CHECK_URL 직후에 MESSAGE_CHECK가 하나 추가되었습니다. 이 check는 URL이 file URL이거나, frame URL이 비어 있거나, scheme/host/port가 frame의 현재 URL과 일치해야 한다는 조건을 강제합니다. 조건을 충족하지 않으면 해당 WebContent process가 강제 종료됩니다.

WebContent→UIProcess trust boundary를 넘는 renderer 제공 URL에 대한 origin 동등성 check 누락.

Same-document navigation은 문서를 언로드하지 않고 URL만 변경하는 방식으로, 주로 History API나 fragment 변경을 통해 이루어집니다. 명세상 새 URL은 현재 문서와 반드시 same-origin이어야 합니다. UIProcess는 address bar를 소유하고 per-WebFrameProxy URL을 관리하며, 이 URL이 address bar에 표시됩니다. MESSAGE_CHECK_URL은 URL의 파싱 가능 여부를 검증하고, protocolHostAndPortAreEqual은 origin을 정의하는 scheme/host/port 조합을 비교합니다.

Fix 이전에는, 조작되거나 스크립트로 제어되는 WebContent process가 didSameDocumentNavigationForFrameViaJS를 임의의 URL로 호출할 수 있었습니다. UIProcess는 이를 그대로 frame의 현재 URL로 기록합니다. 그 결과 address bar에는 공격자가 선택한 origin이 표시되지만, 실제 문서는 여전히 공격자가 제어하는 상태입니다.

🔒

The trust boundary between WebContent and UIProcess for URL display is examined, along with the spoofing impact and what a renderer compromise (or just clever JS) could achieve here.

더 확인하려면 구독해 주세요

🔒

Several reusable IPC-validation audit patterns identified, covering UIProcess handlers that mutate security-UI state based on renderer-supplied data.

더 확인하려면 구독해 주세요