Preprint · 2025 · Open access

Spill The Beans: Exploiting CPU Cache Side-Channels to Leak Tokens from Large Language Models

Andrew Adiletta, Berk Sunar

arXiv (Cornell University) · Published 1 May 2025 · DOI 10.48550/arxiv.2505.00817

Open PDFView at the publisherCite this paper

In brief

“Spill The Beans: Exploiting CPU Cache Side-Channels to Leak Tokens from Large Language Models” is a 2025 preprint by Andrew Adiletta and Berk Sunar, published in arXiv (Cornell University). OpenAlex counts 13 citations as of 19 November 2026. It is open access under a public domain licence: the full text is free to read at arXiv (Cornell University).

Citations
13
Most cited in
2026 (12)
References
21
Authors
2

Abstract

Side-channel attacks on shared hardware resources increasingly threaten confidentiality, especially with the rise of Large Language Models (LLMs). In this work, we introduce Spill The Beans, a novel application of cache side-channels to leak tokens generated by an LLM. By co-locating an attack process on the same hardware as the victim model, we flush and reload embedding vectors from the embedding layer, where each token corresponds to a unique embedding vector. When accessed during token generation, it results in a cache hit detectable by our attack on shared lower-level caches. A significant challenge is the massive size of LLMs, which, by nature of their compute intensive operation, quickly evicts embedding vectors from the cache. We address this by balancing the number of tokens monitored against the amount of information leaked. Monitoring more tokens increases potential vocabulary leakage but raises the chance of missing cache hits due to eviction; monitoring fewer tokens improves detection reliability but limits vocabulary coverage. Through extensive experimentation, we demonstrate the feasibility of leaking tokens from LLMs via cache side-channels. Our findings reveal a new vulnerability in LLM deployments, highlighting that even sophisticated models are susceptible to traditional side-channel attacks. We discuss the implications for privacy and security in LLM-serving infrastructures and suggest considerations for mitigating such threats. For proof of concept we consider two concrete attack scenarios: Our experiments show that an attacker can recover as much as 80%-90% of a high entropy API key with single shot monitoring. As for English text we can reach a 40% recovery rate with a single shot. We should note that the rate highly depends on the monitored token set and these rates can be improved by targeting more specialized output domains.

Cite this paper

Formatted from the catalogue record. Check names, capitals and page numbers against the paper before you submit.

APA 7

Adiletta, A., & Sunar, B. (2025). Spill The Beans: Exploiting CPU Cache Side-Channels to Leak Tokens from Large Language Models. arXiv (Cornell University). https://doi.org/10.48550/arxiv.2505.00817

MLA 9

Adiletta, Andrew, and Berk Sunar. “Spill The Beans: Exploiting CPU Cache Side-Channels to Leak Tokens from Large Language Models.” arXiv (Cornell University), 2025. https://doi.org/10.48550/arxiv.2505.00817.

Chicago

Adiletta, Andrew and Berk Sunar. 2025. “Spill The Beans: Exploiting CPU Cache Side-Channels to Leak Tokens from Large Language Models.” arXiv (Cornell University). https://doi.org/10.48550/arxiv.2505.00817.

Harvard

Adiletta, A. and Sunar, B. (2025) ‘Spill The Beans: Exploiting CPU Cache Side-Channels to Leak Tokens from Large Language Models’, arXiv (Cornell University). doi:10.48550/arxiv.2505.00817.

IEEE

A. Adiletta and B. Sunar, “Spill The Beans: Exploiting CPU Cache Side-Channels to Leak Tokens from Large Language Models,” arXiv (Cornell University), 2025, doi: 10.48550/arxiv.2505.00817.

BibTeX

@misc{adiletta2025spill,
  title     = {{Spill The Beans: Exploiting CPU Cache Side-Channels to Leak Tokens from Large Language Models}},
  author    = {Adiletta, Andrew and Sunar, Berk},
  howpublished = {arXiv (Cornell University)},
  year      = {2025},
  doi       = {10.48550/arxiv.2505.00817},
  url       = {https://doi.org/10.48550/arxiv.2505.00817}
}

Download for a reference manager: BibTeX (.bib) · RIS for Zotero, Mendeley and EndNote (.ris)

Topic and keywords

Physical Sciences › Computer Science › Hardware and Architecture › Security and Verification in Computing

  • cache side-channel attacks
  • large language models
  • shared hardware resources
  • cache eviction
  • side-channel attack mitigation

Work with this paper

Most-cited papers in Computer Science

All highly cited Computer Science papers

Questions about this paper

How do I cite this paper in APA style?

Adiletta, A., & Sunar, B. (2025). Spill The Beans: Exploiting CPU Cache Side-Channels to Leak Tokens from Large Language Models. arXiv (Cornell University). https://doi.org/10.48550/arxiv.2505.00817

How many times has this paper been cited?

13 times, according to OpenAlex on 19 November 2026. Google Scholar and Scopus count different sets of sources, so their numbers differ.

Is this paper free to read?

Yes. It is open access at arXiv (Cornell University): sign in and open the PDF from this page.

Who wrote this paper?

Andrew Adiletta, Berk Sunar.

What is the DOI of this paper?

10.48550/arxiv.2505.00817, permanently at https://doi.org/10.48550/arxiv.2505.00817. Sign in and open it from this page.

Bibliographic data from OpenAlex (CC0), last checked 19 November 2026. ResearchGuru does not host this paper; once you are signed in, the links open it at the publisher or the repository that does.