AI for Business

New Research Reveals Spectre Attack on Cloudflare Workers Leaking JWT Data

Cybersecurity researchers have uncovered a remote Spectre attack targeting Cloudflare Workers that successfully leaked a JSON Web Token (JWT) from a co-located Worker in the production...

Share:
New Research Reveals Spectre Attack on Cloudflare Workers Leaking JWT Data

Cybersecurity researchers have uncovered a remote Spectre attack targeting Cloudflare Workers that successfully leaked a JSON Web Token (JWT) from a co-located Worker in the production environment, achieving a data exfiltration rate of up to 12 bits per second - 360 times faster than a similar attack demonstrated in 2021.

The end-to-end experiment involved an attacker Worker and a victim Worker both controlled by the researchers, with the JWT deliberately placed in the victim's memory. The research paper emphasized that no customer data was accessed during the test.

Cloudflare responded by stating that the attack has already been mitigated in production following improvements to its Dynamic Process Isolation (DyPrIs), integration of the V8 Sandbox, and deployment of Memory Protection Keys (MPK)-based in-process isolation. The company also noted that it found no indicators of active exploitation over the past three years.

The researchers, however, concluded that "the production implementation of DyPrIs was insufficient," pointing to two specific weaknesses: WebSocket communications could serve as a remote timing source, and Durable Objects could keep a Worker isolate alive for extended periods, allowing the attack to continue before isolation kicked in. Additionally, heavy WebSocket input/output activity reduced the branch-misprediction signal below DyPrIs' detection threshold.

Cloudflare described the issue as a limitation in its DyPrIs implementation, while the paper argued that these weaknesses reflect fundamental limitations of the detection approach rather than simple oversights. The researchers recommended that robust detection should occur during execution and use a signal that cannot be suppressed by I/O activity.

The production tests were conducted on Linux servers using AMD EPYC Zen 2 and Zen 3 processors, with measurements intentionally taken at night when CPU utilization was between 10% and 25% to achieve the best results. Higher system load reduced the leakage rate, though slower attacks remained feasible under load.

This disclosure comes nearly five years after Cloudflare and TU Graz first demonstrated a remote Spectre attack against Workers at 120 bits per hour, which led to the introduction of DyPrIs. The earlier research reported a 0.61% false-positive rate and concluded that DyPrIs provided security guarantees statistically equivalent to strict process isolation for the Spectre attacks evaluated at the time.

Cloudflare has since published additional hardening measures, including improved DyPrIs detection, the V8 Sandbox to limit transient access to 64-bit pointers, and MPK-based in-process isolation that places Worker heaps behind hardware-enforced protection keys. The company noted that random MPK assignment alone would trap about 92% of cross-isolate accesses, and a stricter rotating memory layout is used to close the remaining gap.

The researchers' attack achieved a 99.16% accuracy rate at 12 bits per second, compared to the earlier attack's 2 bits per minute, highlighting the need for ongoing vigilance in cloud-based multi-tenant environments.

Source: The Hackers News

Ready to Modernize Your Business?

Get your AI automation roadmap in minutes, not months.

Analyze Your Workflows →