A revisit of remote Spectre attacks on Cloudflare Workers
Cloudflare reassessed Spectre attack risks on Workers, finding a limitation in its Dynamic Process Isolation defense that allowed a remote leak of up to 12 bits per second with 99% accuracy. The company has since enhanced mitigations, including integrating the V8 Sandbox and in-process isolation mechanisms.
In 2021, Cloudflare introduced Dynamic Process Isolation (DyPrIs) to mitigate remote Spectre attacks on its Workers platform by isolating suspicious scripts into separate processes. A 2024-2025 reassessment, however, identified a limitation in this defense, enabling a reliable remote Spectre attack that leaked up to 12 bits per second with 99% accuracy under production workloads. The attack required overcoming obstacles such as shared hardware interference and coarse-grained timers, demonstrating the evolving nature of Spectre-based threats.
The research led to improvements in DyPrIs, including the integration of the V8 Sandbox and additional in-process isolation mechanisms to reduce memory disclosure risks. Cloudflare also published a co-authored paper detailing the findings, which were conducted between 2024 and early 2025. The company noted that the attack is already mitigated in its production environment and found no evidence of active exploitation over the past three years.
Cloudflare Workers executes untrusted JavaScript on the edge using language-level isolation via V8 isolates, allowing tens of thousands of tenants to share the same operating-system process while maintaining separate JavaScript heaps. This design minimizes startup latency and improves efficiency compared to full process isolation. The platform employs multiple defense layers, including automated V8 patch pipelines, a two-layered sandbox with Linux namespaces and seccomp filters, and the option to schedule scripts in separate process sandboxes.
The Spectre attack exploits speculative execution in CPUs, where transient instructions leave traces in microarchitectural states like caches. Cloudflare’s Workers platform mitigates such risks by freezing local timers, disallowing multithreading and shared memory, and isolating malicious scripts. The attack required overcoming challenges such as co-location between attacker and victim, discovering a reliable remote timer, and amplifying signals to differentiate cache hits from misses, leveraging techniques like tree-based PLRU cache-replacement policies.