Shuffled KV cache obfuscation enables full token-multiset recovery
Shuffled linear-transform and permutation defenses do not hide token representations and can be broken to recover tokens
Security & privacy arXiv 18 Nov 2026 Attack Prototype evidence
Published as “When Shuffling Fails: Token Recovery from Obfuscated KV Caches”
Why it matters
The work demonstrates that current shuffled-obfuscation defenses for KV caches provide little privacy, enabling practical extraction of user inputs and sensitive values.
Summary
The paper shows that repeated-token inputs collapse the permutation space of KV-Cloak from b! to b states, enabling a calibration that recovers the secret transforms and achieves 100% token-multiset recovery across eleven models, with a downstream text similarity of 0.947 and 97.5% top-1 accuracy on synthetic sensitive-value identification. The attack works on GPU for all 13 configurations but requires a probe of at least 2,048 tokens to observe all b states; shorter probes (≤512 tokens) fail to recover any state. The authors also demonstrate the same orbit-collapse vulnerability in two other shuffled-obfuscation defenses and propose VEILKV as an authenticated-encryption replacement.
What they found 5
- Token-multiset recovery (bag recall) is 100% on GPU across all configurations.
“Token-multiset recovery (bag recall Rbag) is 100% on GPU across all configurations, including caches from a live vLLM engine.”
- Mean embedding cosine between reconstructed and original text is 0.947.
“A language-model ordering step reaches mean embedding cosine Scos = 0.947 on a 602prompt content-balanced subset drawn from the same pool, recovering substantial semantic content.”
- Sensitive-value identification achieves 97.5% top-1 accuracy using only the recovered token multiset.
“The program identifies the correct value with 97.5% expected top-1 accuracy, relying solely on the recovered token multiset without any ordering.”
- Cluster separation ratio exceeds 1,324.6 despite floating-point noise, confirming clear orbit collapse.
“the sep. ratio exceeds 1,324.6 in every KV head despite floatingpoint noise.”
- Probes of ≤512 tokens fail to achieve any state coverage or calibration.
“At 512 tokens or fewer, neither criterion is met in any of the 100 trials.”
Caveats 5
- The attack requires a probe of at least 2,048 tokens to observe all b states; shorter probes (≤512 tokens) provide no coverage.
- Success depends on the attacker having cache-level read access and the probe and target sharing the same secret epoch, which may be rare in real deployments.
- We assume the probe and target share a secret scope but do not measure how often real deployments satisfy this condition.
- Cache-level access is a prerequisite of the attack, not a contribution of it.
- We do not claim general exact-prompt reconstruction, deeper-layer recovery, or attacks on untrusted accelerators with unrestricted access to all intermediate computation.
What’s new here 4
- Identifies that input symmetry can reduce the effective permutation orbit, invalidating the b! security argument.
- Introduces a repeat-to-reveal calibration that extracts secret linear transforms from a single repeated-token probe.
- Achieves full token-multiset recovery and high-fidelity text reconstruction without needing per-block brute-force permutation search.
- Proposes VEILKV, a byte-level authenticated-encryption scheme as a practical defense.