Brifing

Spectre Attack on Cloudflare Workers Leaks JWT at 12 Bits/Second

Co-located Worker in same process leaked sensitive data at unprecedented rate.

The Hacker News2 min

1Scale of the Spectre Attack

Researchers demonstrated a remote Spectre attack against Cloudflare Workers, successfully exfiltrating JSON Web Tokens (JWT) from a co-located Worker within the same process. The attack achieved data leakage at 12 bits per second - 360 times faster than a similar attack demonstrated in 2021. The experiment used attacker and victim Workers controlled by the researchers.

2Cloudflare's Mitigation Measures

Cloudflare stated it has mitigated the attack in production by improving Dynamic Process Isolation (DyPrIs), integrating V8 Sandbox, and deploying Memory Protection Keys (MPK)-based isolation. The company found no evidence of active exploitation in the past three years. However, researchers proved DyPrIs implementation in production was insufficient against this attack vector.

3Architectural Vulnerability

Cloudflare Workers runs multi-tenant code in separate V8 isolates within the same OS process. While this language-level isolation reduces startup latency, memory reads within a shared Worker process can lead to cross-tenant leakage. The attack requires both attacker and victim Workers to be co-located in separate V8 isolates within the same Worker process.

4Timing Sources Exploitation

Workers restrict local timing sources during CPU execution. However, researchers discovered WebSocket communications could provide remote timing, and Durable Objects could keep a Worker isolate alive for 5-20 hours. While DyPrIs isolates suspicious scripts post-invocation, long-lived Durable Object invocations continue running before isolation occurs.

5Detection Mechanism Flaws

Heavy WebSocket I/O activity increases instruction translation lookaside buffer (iTLB) activity, reducing DyPrIs' normalized branch-misprediction signal below detection threshold. Cloudflare considers this a DyPrIs implementation limitation, while researchers argue it reflects fundamental constraints of the detection approach. Robust detection should occur during execution using I/O-resistant signals.

6Testing Environment and Results

Production tests were conducted on Linux servers with AMD EPYC Zen 2/Zen 3 processors during low-utilization periods (10-25% CPU). While higher system load reduced leakage rate, slower attacks remained feasible. The attack achieved 12 bits/second leakage at 99.16% accuracy, compared to just 2 bits/minute in 2021's attack.

7Historical Context

Five years prior, Cloudflare and TU Graz published research demonstrating a remote Spectre attack against Workers at 120 bits/hour, introducing DyPrIs as defense. The 2021 paper reported 0.61% false-positive rate, concluding DyPrIs provided security guarantees equivalent to strict process isolation against then-known Spectre variants.

8Industry Implications

These findings necessitate reevaluation of security assumptions in shared infrastructure models. Cloudflare's September 2025 hardening measures include random MPK assignment (trapping ~92% cross-isolate accesses) and stricter rotating layout to address same-key scenarios. The research underscores persistent challenges in securing multi-tenant serverless environments against sophisticated timing attacks.

Original article: The Hacker News — Cloudflare Workers'da Spectre Saldırısıyla JWT Sızıntısı