aiqbench analysis
This research identifies a critical side-channel vulnerability in local LLM deployments where attackers can reconstruct generated text by monitoring CPU cache activity during the detokenization phase. The attack succeeds across diverse hardware and frameworks without relying on specific model architectures, exposing a broad range of open-source agents and products to semantic leakage. For practitioners running private models, this underscores the necessity of hardening tokenizer implementations and isolating inference pipelines from shared memory spaces to prevent unauthorized output reconstruction.
Detokenization Leaks: Reconstructing Local LLM Outputs From Cache Traces
From arXiv
Full textWe present a new attack that reconstructs the text generated by locally hosted LLMs by observing CPU cache activity during detokenization. Unlike prior attacks that rely on deployment-specific assumptions, such as shared data memory, CPU offloading, or Mixture-of-Experts architectures, our approach targets the detokenizer, a component used in default LLM inference pipelines. To obtain clean signals, we use Flush+Reload on shared tokenizer code to detect when decoding occurs, which lets us perform Prime+Probe at the right moment and isolate token-dependent cache activity.
We then apply a clustering-and-language-model pipeline to recover text from noisy cache observations. We evaluate the attack across multiple datasets, hardware platforms, inference frameworks, and model families, and show that it can recover semantically accurate outputs from real-world local LLM deployments, including agentic systems. This vulnerability is particularly significant because the most widely used tokenizer implementations are susceptible to the attack and are embedded in many popular local LLM products and agent frameworks, including systems such as OpenClaw (which we demonstrate), substantially broadening the practical attack surface.
Full text under the publisher's open licence · 169 words