WebKit Navigation API Cross-Port canIntercept Bypass (CVE-2026-20643)
by Fliv (flvin.com) · 2026-07-05
- Severity
- Medium
- CVE
- CVE-2026-20643
- Category
- web
- Affected product
- WebKit (Safari / WebKit-based browsers), Navigation API implementation
- Affected versions
- Pre-fix WebKit builds (fixed by the linked upstream WebKit commit)
- Disclosed
- 2026-07-05
- Patch status
- patched
Tags
References
Archive entry
intelseclab/poc-archiveMetadata
| Field | Value |
|---|---|
| Date Added | 2026-07-05 |
| Last Updated | 2026-03 |
| Author / Researcher | Fliv (flvin.com) |
| CVE / Advisory | CVE-2026-20643 |
| Category | web |
| Severity | Medium |
| CVSS Score | Not specified in source |
| Status | PoC |
| Tags | webkit, browser, navigation-api, same-origin-policy, cross-port, javascript, test-page, canintercept |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | WebKit (Safari / WebKit-based browsers), Navigation API implementation |
| Versions Affected | Pre-fix WebKit builds (fixed by the linked upstream WebKit commit) |
| Language / Platform | HTML/JavaScript test page, runs in a WebKit-based browser |
| Authentication Required | No |
| Network Access Required | Yes (requires serving the page on two distinct ports) |
Summary
The Navigation API’s navigate event exposes an event.canIntercept flag that browsers must set to false for navigations that cross a security boundary the page is not allowed to intercept — including navigations to a different port on the same host. This PoC serves a page that programmatically clicks a link pointing at the same hostname on a different port and inspects event.canIntercept inside the navigate listener. On an unpatched WebKit, canIntercept was incorrectly reported as true for such cross-port navigations, meaning a page could intercept and manipulate a navigation that should be treated as crossing an origin boundary. The fix is tied to a specific upstream WebKit commit that corrects the port-comparison logic feeding into canIntercept.
Vulnerability Details
Root Cause
WebKit’s Navigation API implementation did not correctly treat differing port numbers as an origin boundary when computing event.canIntercept, so cross-port navigations were (incorrectly) reported as interceptable just like same-origin navigations.
Attack Vector
- Host a malicious page on one port (e.g.
:8800) that a victim visits. - The page registers a
navigateevent listener on thenavigationobject and programmatically triggers (or waits for) a navigation to the same hostname on a different port (e.g.:8000). - Because
event.canInterceptincorrectly evaluates totrue, the script can callevent.preventDefault()/ intercept and manipulate what should be a cross-origin-equivalent navigation, in violation of the boundary the Navigation API is supposed to enforce for differing ports.
Impact
Weakens the Navigation API’s origin-boundary guarantees, letting a page intercept/manipulate navigations to a different port on the same host that should have been treated as non-interceptable; primarily a security-boundary/logic flaw rather than memory corruption.
Environment / Lab Setup
Target: WebKit-based browser (pre-fix build)
Attacker: Static file server capable of serving the same page on two different ports (e.g. :8000 and :8800)
Proof of Concept
PoC Script
See
index.html(standalone repro with an on-page log) andnavigate-event-canintercept-cross-port.html(formal web-platform-tests-style assertion, requires the standard WPTtestharness.js/testharnessreport.jshelper scripts) in this folder.
| |
The page registers a navigate listener, then synthesizes a click on a link pointing at the same hostname on the other port. It logs event.canIntercept and flags the case where it is not false, which indicates the cross-port boundary is not being enforced.
Detection & Indicators of Compromise
Signs of compromise:
- Pages registering
navigateevent listeners that inspect or act onevent.canInterceptfor navigations to other ports on the same host. - Unexpected interception/rewriting of navigations that should cross a port boundary.
Remediation
| Action | Detail |
|---|---|
| Primary fix | Update to a WebKit build including the upstream fix commit (850ce3163e55ebaa33f712d05681e5522b518806), which corrects canIntercept to be false for cross-port navigations |
| Interim mitigation | Keep Safari/WebKit-based browsers up to date; avoid relying on Navigation API interception behavior for security-sensitive logic until patched |
References
Notes
Mirrored from https://github.com/Fliv/CVE-2026-20643 on 2026-07-05.
| |