# Summary: 2026-07-22_09-32-45Z_HijackKV_NewThreatinPosition_IndependentKVCacheReu.md Saved: 2026-07-24 01:39 Source: 2026-07-22_09-32-45Z_HijackKV_NewThreatinPosition_IndependentKVCacheReu.md Model: None --- ## Summary The paper introduces HijackKV, a novel attack that exploits position‑independent KV cache reuse in large language models to silently hijack model behavior without altering the visible input text. By leveraging benign‑looking token chunks that trigger cache hits, an attacker can embed malicious context into the cached key‑value pairs and later retrieve those contaminated entries during inference. The authors demonstrate that this vulnerability persists across multi‑turn interactions, transfers between models in black‑box settings, and remains effective even under low hit rates or frequent recomputation. Their contribution is both a theoretical analysis of the security flaw and a practical attack framework (HIJACKKV) that achieves high success rates. ## Semantic links - [[concepts/ai-foundations/ai-ml-foundations-lesson-11-large-language-models-the-modern-ai-interface.md|AI/ML Foundations Lesson 11 - Large Language Models: The Modern AI Interface]] — 4 title terms overlap; 54 backlinks; 5 summary/topic terms overlap - [[concepts/papers/2026-07-21_16-31-35Z_PromptDesignatScale_HowFormat_InstructionCo_summary.md|Summary: 2026-07-21_16-31-35Z_PromptDesignatScale_HowFormat_InstructionCount_and.md]] — 3 title terms overlap; 11 backlinks; 11 summary/topic terms overlap - [[concepts/papers/2026-07-23_21-59-56Z_QwenAgentWorld_LanguageWorldModelsforGeneralAgents_summary.md|Summary: Qwen-AgentWorld: Language World Models for General Agents]] — 3 title terms overlap; 29 backlinks; 9 summary/topic terms overlap ## Key Contributions - [Finding 1] Position‑independent KV cache reuse can inadvertently store attacker‑controlled prefixes in benign text chunks, creating a hidden attack vector. - [Finding 2] The HIJACKKV framework systematically optimizes an attacker‑controlled prefix to encode malicious intent while leaving the visible token sequence unchanged. - [Finding 3] Experimental results show that HIJACKKV achieves ~94% success on average, remains robust under realistic constraints such as 10 % hit rates and 50 % recomputation frequency. ## Methodology The authors first analyze how KV caches are generated during model inference: each token’s key is derived from its position‑independent hash, while the value encodes the entire prefix up to that point. They then construct a benign text chunk that triggers a cache hit and embed an attacker‑controlled prefix within it, ensuring the cached value reflects malicious context. During evaluation, they inject this contaminated KV into subsequent queries and measure how often the hijacked behavior manifests. The framework is evaluated across single‑turn and multi‑turn scenarios, with varying hit rates and recomputation frequencies, to assess practicality. ## Results HIJACKKV demonstrates an average success rate of 94 % in a single attempt, indicating that even low‑frequency cache hits can be exploited. The attack persists over multiple turns, meaning the hijacked KV is reused across interactions without additional exploitation effort. It also transfers across different models when only the model’s output is observable (black‑box setting). Experiments with realistic constraints—such as 10 % hit rates and 50 % recomputation—still yield high success rates, confirming resilience of the attack under typical deployment conditions. ## Significance This work highlights a previously unnoticed security flaw in widely adopted inference optimizations that reduce latency. If exploited, it could allow adversaries to manipulate model outputs without detectable input changes, undermining trust in cached inference pipelines. Addressing this vulnerability is crucial for securing large language models used in production systems where performance gains are prioritized over exhaustive security audits. ## Related Concepts - Key‑Value (KV) cache - Prefix‑based reuse - Position‑independent KV reuse - Cache hijacking - Black‑box model evaluation - Multi‑turn interaction security