Spill The Beans: Exploiting CPU Cache Side-Channels to Leak Tokens from Large Language Models
Andrew Adiletta, Berk Sunar

TL;DR
This paper demonstrates that cache side-channel attacks can effectively leak tokens from large language models, exposing significant privacy and security vulnerabilities in LLM deployment.
Contribution
The work introduces Spill The Beans, a novel cache side-channel attack method targeting LLMs, and provides extensive experimental validation of its effectiveness.
Findings
Leakage of 80-90% of high entropy API keys in single shot
Approximate 40% recovery rate of English text tokens
Feasibility of cache side-channel attacks on large models demonstrated
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSecurity and Verification in Computing · Adversarial Robustness in Machine Learning · Advanced Malware Detection Techniques
MethodsSparse Evolutionary Training
