When Shuffling Fails: Token Recovery from Obfuscated KV Caches
Abstract
LLM serving systems store, offload, and share KV caches, exposing token-level representations to infrastructure operators and co-tenants. Shuffled obfuscation combines secret linear transforms with fresh permutations, claiming security from b! possible shufflings. We show that input symmetry invalidates this counting argument: security depends on distinguishable outputs under chosen inputs. Repeated tokens produce identical first-layer Value rows, making every row permutation leave the data unchanged. Only auxiliary structures such as a single-row recovery marker vary, reducing the effective state space from b! to b. We construct Repeat-to-Reveal. The attacker collects the b distinguishable states from its own probes and exploits their rank-one differences to recover an equivalent denoiser without knowing the defender's secret parameters. A one-time calibration transfers across requests sharing the same secret epoch, enabling passive token-multiset recovery from subsequently observed cache blocks through public-model dictionary matching. We instantiate the attack on official KV-Cloak and evaluate 3,000 real WildChat user prompts across nine models and eleven configurations. The attack recovers the secret parameters with high accuracy and achieves 100 percent token-multiset recovery on GPU. Refreshing row-level secrets between epochs interrupts cross-request transfer, confirming secret reuse scope as the operative vulnerability. We further confirm orbit collapse on two other open-source defenses: the sequence-permutation implementation of Thomas et al. and PermLLM. The KV-Cloak developers invited a detailed report through their private vulnerability reporting channel.
Create a lesson
Metadata
- Comments
- 18 pages, 8 figures, 4 tables
Related papers
From Token Changes to Task Failures: Bit Flips in a Shared KV-Cache Block
Shared title terminologycs.CRYuji Yamamoto, Satoshi Matsuura
A Model Obfuscation and Controllable Authorization Scheme for Deep Learning as a Service
Shared title terminologycs.CRNianyun Song, Haodi Wang, Yu Guo et al.
BlockJack: Cross-Tenant Redirection Fault Attacks on Paged KV Cache Address Translation in LLM Serving
Shared title terminologycs.CRQifan Wang, Jeremy Boy, Jonas Sander et al.
Verified Netlist-to-RTL Recovery with LLM Agents
Shared title terminologycs.CRAhmet Efe, Recep Bugra Uludag, Ulya R. Karpuzcu
KVMARK: Fragile Watermarking for KV-Cache Integrity in Latent Multi-Agent Systems
Shared title terminologycs.CRMarjan Beheshti, Ronghua Xu
Where the Savings Go: The Limits of Hiding Cross-Tenant Cache Hits in LLM Serving
Shared title terminologycs.CRBowen Sun, Chaowei Xiao