Browser Exploit Chains
Exploit Chains & Real-World Case Studies · Exploit Development track
7 min read
In this module
The Browser as a Battlefield
Web browsers are among the most complicated and most attacked pieces of software ever shipped. They run arbitrary code from the internet, render half a dozen complex document formats, implement piles of web APIs, juggle multimedia, and manage network connections. All on the user's machine. If you want a remote compromise, the browser is the most rewarding place to look.
Modern browsers have piled up genuinely sophisticated defences in response. You can't follow a browser exploit chain without first understanding the architecture it's clawing through.
Browser Security Architecture
All major browsers use a multi-process architecture with sandboxing:
- Browser process: The privileged parent process that manages tabs, handles UI, and mediates all access to the operating system (file system, network, devices).
- Renderer processes: Unprivileged child processes that parse HTML, execute JavaScript, and render web content. Each renderer is sandboxed - it cannot access the file system, network (directly), or other OS resources.
- GPU process: Handles graphics rendering, also sandboxed.
The solid arrows are the only doors the design intends. The dotted ones are the escape routes from Step 2 below, and every one of them starts from inside a renderer you've already compromised.
The renderer sandbox is mean. On Linux, a seccomp-BPF filter blocks anything that would open files or sockets and restricts many of the remaining syscalls by argument. The allowlist still runs to dozens of calls the renderer can't live without (memory management, futexes, clocks, I/O on descriptors it was handed), and every one of them is kernel attack surface. Windows uses restricted tokens and job objects. macOS leans on its sandbox profile system. The exact mechanism varies; the philosophy doesn't.
Punch a hole in the renderer and you land inside the box, not outside it. You've got code execution, sure, but no filesystem, no network, no persistence. To do anything actually useful you also need to break out — and that's a separate exploit.
The browser sandbox is the wall around the renderer. Inside the wall, untrusted web content gets parsed and executed. Outside it, the privileged browser process holds the keys to the OS. They talk through IPC, and that IPC is the only legitimate way out. So a JavaScript or HTML parser bug, on its own, doesn't hand the attacker your filesystem.
Step 1: Renderer Exploitation
The first link is usually a bug in the JavaScript engine (V8 in Chrome, SpiderMonkey in Firefox, JavaScriptCore in Safari) or in some content parser — image decoders, font renderers, DOM handling, that family.
JS engines are unusually fertile ground because:
- They run arbitrary, attacker-controlled code, and they have to run it fast
- JIT compilation is a pile of complexity, and complexity grows bugs
- The semantics they have to implement (dynamic types, prototype chains, all the ECMAScript edge cases) are punishing
The recurring vulnerability classes:
JIT compiler bugs: The JIT lowers JavaScript to machine code with aggressive optimisations. When the compiler reasons incorrectly about types or values, the generated code can read or write memory in ways the source language never intended. A bounds check might evaporate during optimisation, opening up an out-of-bounds read or write the JS spec promised couldn't happen.
Type confusion: JS objects change shape on the fly. When the engine's internal type tracking gets out of sync with reality, an object can be accessed with the wrong memory layout — pointers reinterpreted as numbers, numbers reinterpreted as pointers. From there it's a short hop to address leaks or memory corruption.
Garbage collector bugs: The GC has to keep track of every live object and reclaim the dead ones. Free something that's still referenced — or move an object without fixing every pointer to it — and you've manufactured a use-after-free for the attacker.
The shape of a typical renderer exploit:
- Trigger a type confusion or JIT bug to get an out-of-bounds read/write
- Use the read primitive to leak pointers, defeating ASLR
- Use the write primitive to hijack control flow (a ROP chain, a corrupted function pointer) or to corrupt data the engine trusts
- End up with arbitrary code execution inside the renderer
Step 2: Sandbox Escape
Code execution inside the sandbox is a holding pattern. The attacker still has to find a way out, and there are a few well-trodden routes.
IPC bugs: The renderer talks to the browser process via IPC (Mojo in Chrome, IPDL in Firefox), and the browser is supposed to treat every message as adversarial input. When that validation slips — a trusted pointer that shouldn't be trusted, a missing bounds check on a renderer-supplied size, a logic flaw in the message handler — the renderer gets to drive the browser process directly.
Kernel exploits: Skip the browser entirely and shoot through the kernel from inside the sandbox. The sandbox trims down the syscall surface, but it can't shrink it to zero. If any of the syscalls left available has a kernel bug, the sandbox doesn't matter.
GPU process bugs: The GPU process runs in a more permissive sandbox than the renderer and handles meaty operations like shader compilation and texture processing. A bug there is reachable from the renderer over the GPU IPC channel, and the wider sandbox means more useful primitives once you land.
Step 3: Persistence and Payload
Out of the sandbox, the attacker holds the OS at the browser process's privilege level — usually whatever user is logged in. From there:
- Escalate to root/admin: chase a local privilege escalation bug
- Install persistence: drop a startup item, service, or scheduled task that survives reboot
- Deploy payload: a RAT, a keylogger, an exfiltration agent — whatever the operation actually wanted
A Concrete Example: Pwn2Own Browser Chains
Pwn2Own is where researchers publicly land full browser chains against the latest Chrome, Firefox, Safari, and Edge. A winning entry tends to look something like this composite (the steps are typical, not one specific entry):
-
V8 type confusion: A bug in V8's optimising compiler incorrectly tracks the type of an array. The researcher crafts JavaScript that triggers the bug, gaining an out-of-bounds write in the renderer.
-
Information leak: Using the OOB read to leak V8 heap pointers, revealing the ASLR base of V8's code and heap regions.
-
Code execution: Older chains simply overwrote a JIT-compiled function with shellcode and called it. Chrome has since made JIT code much harder to write to, and the V8 sandbox keeps a corrupted V8 heap away from raw pointers, so a current chain usually needs a second bug to escape the V8 sandbox before it can redirect execution into a ROP chain or win with a data-only technique.
-
Mojo IPC bug: The renderer sends a specially crafted IPC message to the browser process. A validation error in the browser's handler leads to a use-after-free in the browser process.
-
Browser process code execution: The attacker reclaims the freed memory with controlled data and achieves code execution in the privileged browser process.
-
Payload: The browser process has full access to the OS. The attacker opens a calculator (the traditional Pwn2Own demonstration) or, in a real attack, installs a persistent backdoor.
Each step is weeks to months of work. The full chain runs into hundreds of expert hours, easily.
Real chains caught in the wild have the same shape. In March 2019 Google disclosed one that paired a use-after-free in Chrome's FileReader (CVE-2019-5786) for renderer code execution with a win32k privilege-escalation bug in Windows 7 (CVE-2019-0808) to get out of the sandbox.
The Arms Race
Browser vendors keep making chains harder to build:
- V8 sandbox: Chrome is layering a software sandbox inside V8 itself, isolating V8's heap so that corrupting a V8 object can't immediately reach into arbitrary memory.
- MiraclePtr/raw_ptr: Chrome is swapping raw pointers for smart pointers that catch use-after-free in the browser process, going straight after the dominant sandbox-escape bug class.
- Site isolation: every site gets its own process, so a compromised renderer for one origin can't peek into another.
- Memory tagging (MTE): ARM hardware that catches memory safety violations at the silicon level, which Chrome is turning on wherever the hardware allows.
Every new layer drives the cost of a full chain up. That's the whole point — make exploitation expensive enough that only the deepest pockets in the world can play.