Cloudflare Workers Vulnerable to Spectre Attack, Leaking JWT at 12 Bits/Second
Cybersecurity researchers have disclosed a remote Spectre attack against Cloudflare Workers that leaked a JSON Web Token (JWT) from a co-located Worker in the production environment at up to 12 bits per second.

A remote Spectre attack against Cloudflare Workers has been disclosed, allowing an attacker to leak a JSON Web Token (JWT) from a co-located Worker in the production environment at up to 12 bits per second.
The end-to-end experiment used an attacker Worker and a victim Worker controlled by the researchers, with the JWT intentionally placed in the victim's memory. The research paper stated that no customer data was accessed.
Cloudflare has already mitigated the attack in production by improving Dynamic Process Isolation (DyPrIs), integrating the V8 Sandbox, and deploying Memory Protection Keys (MPK)-based in-process isolation. The company found no indicators of active exploitation over the last three years.
However, the researchers found that the production implementation of DyPrIs was insufficient. They demonstrated that a memory read within a shared Worker process can lead to cross-tenant leakage, and that the attack requires the attacker and victim Workers to be co-located in separate V8 isolates within the same Worker process.
The researchers also found that WebSocket communications could provide a remote timing source, while Durable Objects could keep a single Worker isolate alive for five to more than 20 hours. They discovered that a long-lived Durable Object invocation could continue running before the isolation took place, and that WebSocket-heavy input/output (I/O) activity increased instruction translation lookaside buffer (iTLB) activity, reducing the normalized branch-misprediction signal used by DyPrIs below its detection threshold.
Cloudflare described the issue as a limitation in its DyPrIs implementation, while the paper said the two weaknesses reflected fundamental limitations of the detection approach rather than implementation oversights.
The researchers conducted production tests on Linux servers using AMD EPYC Zen 2 and Zen 3 processors, intentionally running measurements at night, when CPU utilization was between 10% and 25%, to observe the best possible results. They found that higher system load reduced the leakage rate, although slower attacks remained feasible under high load.
The paper reported leakage of up to 12 bits per second at 99.16% accuracy, compared with 2 bits per minute in an earlier attack.
## Cloudflare's Mitigations
Cloudflare has deployed several mitigations to address the issue, including:
- Improved DyPrIs, which improves the detection capabilities of the existing isolation mechanism. - V8 Sandbox, which limits transient access to 64-bit pointers. - MPK-based in-process isolation, which places Worker heaps behind hardware-enforced protection keys.
These mitigations are designed to prevent cross-tenant leakage and ensure the security of Cloudflare Workers.
## Comparison of Spectre Attack Rates
| Attack Rate | Accuracy | | --- | --- | | 12 bits/second | 99.16% | | 2 bits/minute | - |
Note: The earlier attack rate is not specified in the source, so it is not included in the table.





