A remote Spectre attack leaked a secret from Cloudflare Workers
In short
- Cloudflare researchers showed a remote Spectre attack on Cloudflare Workers, its service that runs customers' JavaScript on shared servers. In production, against Workers they controlled, they leaked a secret token from a neighbouring Worker at up to 12 bits a second with more than 99% accuracy.
- Spectre is a flaw in how processors guess ahead: a wrong guess is thrown away but leaves a trace in the cache that an attacker can time. Doing this over the network, with no fast local clock, is what makes this result notable. The previous attack on Workers leaked about 120 bits an hour.
- Cloudflare says its existing defence, Dynamic Process Isolation (DyPrIs), missed the attack, and that the attack is already mitigated in production. It says it found no sign of exploitation in the last three years. It also says its fixes are not a complete answer to Spectre.
- The post is dated 19 August 2026 and covers research done in 2024 and early 2025. The results are Cloudflare's own.
12 bit/s peak leak rate, over 99% accurate; 120 bit/h rate of the previous attack on Workers; 5 to 20+ hours how long one isolate was kept alive; 64 MB memory allocated to dodge cache eviction (for a 256 KB L2 cache)
What is a Spectre attack?
Modern processors guess which way a branch in a program will go and start working before they know. If the guess is wrong, the results are discarded. Cloudflare's post compares it to hiking: you take a wrong turn, go back, and the trail looks untouched, but your footsteps remain in the mud. The "footsteps" are changes in the CPU cache, the small fast memory next to the processor. An attacker makes the processor transiently read memory it should not, encodes one bit into the cache, then times how fast the data comes back: faster means the bit was 1, slower means 0.
Why Workers are a target
Workers runs untrusted JavaScript from many customers. Instead of giving each its own process, it uses V8 isolates, so tens of thousands of tenants can share one operating-system process, each with its own JavaScript heap. That is cheap and fast to start, but it means a Spectre leak inside a process can cross from one customer to another. Cloudflare's defences include freezing local timers (during CPU-only work, Date.now() and performance.now() do not advance), banning multithreading and shared memory, shuffling memory, and DyPrIs, which watches hardware performance counters and moves scripts that look like Spectre attacks into their own processes.
How did the attack get around the defences?
The researchers solved four problems.
Two Spectre gadgets did the leaking: one reveals compressed heap pointers, including the isolate's heap base address; the second uses a speculative type confusion to read from an attacker-chosen 64-bit address. They also ran the attack in an off-peak data centre, such as one in Australia during European business hours, because load on the server hurts stability.
To keep a single isolate running, they opened a persistent WebSocket to a Durable Object (a Workers feature for real-time coordination) and sent keep-alive messages, each of which counts as a new invocation and resets the CPU-time and request limits. By yielding between bursts they kept an isolate alive from five to more than 20 hours.
What did they actually leak?
Everything below was against Workers the researchers controlled. They first leaked memory from their own attacker Worker, then confirmed 64-bit reads by reading the vDSO region (a kernel-provided memory area containing readable strings such as gettimeofday). Finally they placed a JWT token (a signed login token) in a co-located victim Worker and leaked it bit by bit; the first byte came out as the character e, 0b01100101. They report up to 12 bit/s with more than 99% accuracy, and that higher rates are possible at the cost of accuracy. By our arithmetic, 12 bit/s is 43,200 bits an hour, about 360 times the earlier 120 bit/h.
Why did Cloudflare's own detection miss it?
Two reasons, per the post. DyPrIs isolates a script only after its invocation ends, and the keep-alive trick can hold one invocation open for hours, so the leak finishes first. And DyPrIs divides branch mispredictions by the number of instruction-TLB accesses; the attack's timer is one big I/O loop whose WebSocket traffic inflates that count, pushing the ratio under the detection threshold, so it looked like an ordinary I/O-heavy Worker.
What Cloudflare changed
- V8 sandbox. It removes raw 64-bit pointers from large parts of the JavaScript heap. Cloudflare says the 64-bit leak gadget in this work no longer works, but other Spectre variants or gadgets may exist.
- Memory Protection Keys (MPK). Since September 2025, Workers uses this hardware feature so each isolate heap sits behind an access boundary within the process. Cloudflare says it blocks the straightforward cross-isolate read this attack relied on, but is not a complete Spectre fix; it has limits such as a finite number of hardware domains.
- Improved DyPrIs. Long-lived and I/O-heavy executions are treated as first-class cases, so detection no longer waits until a script finishes. Cloudflare is investigating adding remote timing behaviour as a detection signal.
Cloudflare says the attack is mitigated, but also says none of the three changes fully solves Spectre. The 2024-25 tests used the pre-sandbox platform and Workers the researchers controlled.
What is not stated or checked
- The post does not say how many bits a real secret would need, or how long leaking a full token took.
- It does not test other providers. It notes that the 30-second CPU and 1,000-subrequest limits used at the time have since been increased.
- We did not read the paper or watch the demo video, and no outside party has replicated the result.
Sources
- A revisit of remote Spectre attacks on Cloudflare Workers, Cloudflare Blog, 19 August 2026
Sources
Related stories
- Chrome AI bug finder and fuzzer near tie: 45 vs 37, 25% shared
- OpenSSL fixes a DTLS bug that can leak heap memory to a peer
- Cloudflare brings full post-quantum switch forward to 2027
- Anthropic says plain Claude Code review finds 11 of 21 logic bugs
- OpenSSL fixes Encrypted Client Hello bug allowing impersonation
- Anthropic posts quantum algorithms its authors call impractical