PrefixWall: Mitigating Prefix Caching Side Channels in Shared LLM Systems

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Pennas, Panagiotis Georgios, Papaioannou, Konstantinos, Guarnieri, Marco, Doudali, Thaleia Dimitra
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866910238313021440
author Pennas, Panagiotis Georgios
Papaioannou, Konstantinos
Guarnieri, Marco
Doudali, Thaleia Dimitra
author_facet Pennas, Panagiotis Georgios
Papaioannou, Konstantinos
Guarnieri, Marco
Doudali, Thaleia Dimitra
contents Large Language Models (LLMs) rely on optimizations like Automatic Prefix Caching (APC) to accelerate inference. APC works by reusing previously computed states for the beginning part of a request (prefix), when another request starts with the same text. While APC improves throughput, it introduces timing side channels: cache hits are faster than misses, creating observable latency differences. In multi-tenant systems, attackers can exploit these differences to infer sensitive information, e.g., by incrementally reconstructing another user's request by observing hit/miss patterns. Current defenses take a sledgehammer approach: they disable APC and cache sharing, isolating users, and sacrificing efficiency for regular users. This paper presents PrefixWall, a system that secures multi-tenant LLM serving systems against APC side channels without sacrificing performance and efficiency. PrefixWall monitors cache reuse across users, flags suspicious sharing, and selectively isolates prefixes, restricting their reuse only when necessary. Evaluation shows that PrefixWall enables up to 70% higher cache reuse and 30% lower inference latency compared to existing defenses that isolate users. PrefixWall's lightweight design demonstrates how security in LLM serving does not have to come at the cost of unnecessarily reduced performance or unbearable overheads.
format Preprint
id arxiv_https___arxiv_org_abs_2603_10726
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle PrefixWall: Mitigating Prefix Caching Side Channels in Shared LLM Systems
Pennas, Panagiotis Georgios
Papaioannou, Konstantinos
Guarnieri, Marco
Doudali, Thaleia Dimitra
Cryptography and Security
Distributed, Parallel, and Cluster Computing
Machine Learning
Large Language Models (LLMs) rely on optimizations like Automatic Prefix Caching (APC) to accelerate inference. APC works by reusing previously computed states for the beginning part of a request (prefix), when another request starts with the same text. While APC improves throughput, it introduces timing side channels: cache hits are faster than misses, creating observable latency differences. In multi-tenant systems, attackers can exploit these differences to infer sensitive information, e.g., by incrementally reconstructing another user's request by observing hit/miss patterns. Current defenses take a sledgehammer approach: they disable APC and cache sharing, isolating users, and sacrificing efficiency for regular users. This paper presents PrefixWall, a system that secures multi-tenant LLM serving systems against APC side channels without sacrificing performance and efficiency. PrefixWall monitors cache reuse across users, flags suspicious sharing, and selectively isolates prefixes, restricting their reuse only when necessary. Evaluation shows that PrefixWall enables up to 70% higher cache reuse and 30% lower inference latency compared to existing defenses that isolate users. PrefixWall's lightweight design demonstrates how security in LLM serving does not have to come at the cost of unnecessarily reduced performance or unbearable overheads.
title PrefixWall: Mitigating Prefix Caching Side Channels in Shared LLM Systems
topic Cryptography and Security
Distributed, Parallel, and Cluster Computing
Machine Learning
url https://arxiv.org/abs/2603.10726