Branch Target Reuse: a new Spectre v2 attack abuses stale branch predictions in JIT engines
Researchers at VUSec (Vrije Universiteit Amsterdam) disclosed Branch Target Reuse (BTR), a new Spectre v2-class attack on JIT engines (CVE-2026-64507, CVE-2026-64508) that exploits stale branch-predictor entries left behind after code is recompiled. Studied against Linux's cBPF, Firefox's SpiderMonkey and Oracle's GraalVM, it yielded an end-to-end exploit that leaks a root password hash from the Linux kernel on Intel chips; Linux and Oracle have shipped fixes.
Researchers at VUSec, the systems security group at Vrije Universiteit Amsterdam, have disclosed Branch Target Reuse (BTR), a new Spectre v2-class attack on just-in-time (JIT) compilers, which are found in web browsers, language runtimes and the operating system kernel. They analyzed Linux's cBPF, Oracle's GraalVM and SpiderMonkey, the JavaScript engine in Firefox, and built two end-to-end exploits against the Linux kernel.
The core insight is that modern CPUs keep code consistent after it is modified, but they don't necessarily discard stale predictions about where indirect branches will jump. When a JIT engine frees a chunk of generated code and later reuses the same memory for new code, an attacker who trained the branch predictor on the old code can make the CPU speculatively jump to an outdated location inside the new code, a "speculative execute-after-free" that can reach gadgets and leak secrets. The team confirmed the behavior on every CPU it tested, from Intel, AMD and Arm.
Their cBPF exploit leaks arbitrary kernel memory on modern Intel CPUs at about 8 bytes per second, bypassing all enabled mitigations. That's slow, but enough: the demo walks kernel data structures to find and leak the root password hash from a running "su" process. They also bypassed the kernel's optional constant-blinding hardening. In Firefox, a proof of concept showed the needed building blocks exist, though a full browser exploit would need more work.
Two Linux CVEs were assigned: CVE-2026-64507, which adds an IBPB branch-predictor flush when a BPF JIT region is reused, and CVE-2026-64508, which hardens against JIT spraying. Oracle's GraalVM now randomizes JIT code-cache locations, while Mozilla is prioritizing the completion of site isolation. Because no current CPU keeps branch prediction in sync with modified code, mitigation is left to software, and users should install OS and runtime updates.