Black Hat's Black Hat Asia 2026 | Cache Me, Catch You: Exploiting LLM Caching Layers in vLLM, GPTCache & Friends: skim's analysis identifies 10 key moments. Security researcher Xiangfan Wu demonstrates how LLM caching layers in frameworks like vLLM and GPTCache act as an exploitable attack surface when shared across users.
Category: Tech. Format: Educational. YouTube video analyzed by skim.
skim AI Analysis
Credibility assessment: Empirically Grounded. Xiangfan Wu presents primary security research backed by empirical cost testing, concrete benchmarks across production serving frameworks like vLLM and GPTCache, and responsible vulnerability disclosures that resulted in upstream vendor patches and CVEs.
Bias assessment: Security-First Perspective. The presentation maintains an objective, technical focus on infrastructure vulnerabilities, naturally prioritizing security boundaries and worst-case multi-tenant attack scenarios over raw inference speed.
Originality: 92% — Novel Attack Surface. Rather than focusing on standard prompt injection or model weight tampering, the research pioneers a systematic teardown of LLM caching layers, demonstrating how non-cryptographic hashes, lossy serialization, and semantic similarity thresholds create exploitable flaws.
Depth: 88% — Rigorous Technical Teardown. The talk categorizes six distinct attack primitives across prefix, multimodal, and semantic caches, quantifies exact cloud compute and API poisoning costs, and evaluates five concrete mitigation strategies with latency trade-offs.
Key Points (10)
1. Xiangfan Wu frames LLM caches as security borders
Timestamp: 00:00:09 to 00:03:26
Xiangfan Wu argues that LLM caching is no longer just a performance optimization layer, but a security boundary that determines which requests are treated as equivalent. When prefix, multimodal, or semantic caches are shared across users or tenants, a single defective cache ID allows an attacker to serve poisoned outputs before the model computes new input. Treating caches purely as speed boosters exposes multi-tenant systems to cross-user compromise.
Significance (High): Reframes LLM infrastructure security by showing that attackers can bypass model-level safety entirely if they manipulate the upstream cache lookup layer.
Sources in support: Xiangfan Wu (Student, Ocean University of China and Tencent Zhuque Lab)
2. Three cache types share a flawed three-step flow
Timestamp: 00:03:27 to 00:06:29
Prefix, multimodal, and semantic caches all rely on the same three-step pipeline: serializing input into an internal representation, generating a lookup key via hashing or embeddings, and reusing stored state instead of recomputing. Flaws inside this pipeline affect multiple serving engines and middleware frameworks, including vLLM, SGLang, and GPTCache. The vulnerability is systemic across modern LLM infrastructure rather than an isolated bug in a single tool.
Significance (High): Identifies the exact architectural chokepoints—serialization, key generation, and state reuse—where performance shortcuts turn into systemic vulnerabilities.
Sources in support: Xiangfan Wu (Student, Ocean University of China and Tencent Zhuque Lab)
3. Six attack paths target users and system integrity
Timestamp: 00:06:36 to 00:10:32
The research categorizes six concrete attack paths into two distinct threat models: user-oriented fraud (F1-F3) and system integrity compromise (I1-I3). User-oriented attacks poison shared caches so future users inherit malicious or misleading responses, while integrity attacks force the system to skip moderation or audit checks by matching malicious inputs to benign cached approvals.
Significance (Medium): Provides security teams with a clear taxonomy separating attacks that deceive end users from those that blind internal safety and moderation workflows.
Sources in support: Xiangfan Wu (Student, Ocean University of China and Tencent Zhuque Lab)
4. System prompt hash collisions cost five cents
Timestamp: 00:10:39 to 00:13:58
In the F1 system prompt collision attack, an adversary crafts a malicious prompt with collision padding that produces the exact same non-cryptographic Python hash as a target application's fixed system prompt. By injecting this colliding payload during a cache refresh window, the attacker populates the shared prefix cache with altered assistant behavior that subsequent users inherit.
Significance (High): Demonstrates that relying on default non-cryptographic hashes for prefix caching lets attackers rewrite assistant instructions for all tenants for pennies.
Sources in support: Xiangfan Wu (Student, Ocean University of China and Tencent Zhuque Lab)
5. Semantic cache poisoning hits 72% for 75 cents
Timestamp: 00:14:01 to 00:18:22
The F2 semantic fuzzy poisoning attack targets semantic caches like GPTCache without needing exact hash collisions, relying instead on embedding similarity thresholds. By generating queries in the semantic neighborhood of common FAQ requests and appending a malicious suffix that steers the LLM toward a false answer, the attacker plants poisoned responses inside the cache boundary.
Significance (High): Proves that tuning semantic cache thresholds for higher hit rates directly expands the attack surface, turning customer-support caches into false claims channels.
Sources in support: Xiangfan Wu (Student, Ocean University of China and Tencent Zhuque Lab)
6. RAG context makes semantic caches easier to poison
Timestamp: 00:18:23 to 00:21:05
In the F3 attack, adding Retrieval-Augmented Generation (RAG) context to prompts unexpectedly makes semantic caches more vulnerable rather than safer. Because shared retrieved knowledge dominates the prompt text, distinct user queries become more similar in embedding space, shifting mean similarity from roughly 0.77 to 0.83. Consequently, an attacker needs only 100 queries costing around $0.15 to poison a RAG-backed semantic cache and hijack responses across users.
Significance (High): Exposes a counterintuitive interaction where RAG context compresses embedding distances, lowering the cost of semantic cache poisoning by fivefold.
Sources in support: Xiangfan Wu (Student, Ocean University of China and Tencent Zhuque Lab)
7. Prompt and block collisions hide bad code in KV cache
Timestamp: 00:21:09 to 00:25:39
Moving to system integrity attacks, I1 (prompt collision) and I2 (block-wise collision) allow attackers to bypass automated code review or moderation by pre-populating the cache with a benign request's approval or KV state. In block-wise prefix caching, where block keys depend on the current block and previous prefix, an attacker collides a malicious block's hash with a benign block so the engine reuses the benign KV cache.
Significance (High): Shows how block-level KV cache collisions can make malicious code or instructions completely invisible to an LLM during automated security reviews.
Sources in support: Xiangfan Wu (Student, Ocean University of China and Tencent Zhuque Lab)
8. Lossy image hashes let bad images bypass moderation
Timestamp: 00:25:41 to 00:29:41
The I3 multimodal collision attack exploits serving stacks that generate image cache keys using only partial bytes, dimensions, or metadata rather than full canonical pixel data. Because two visually different images can share the same size or metadata hash, an attacker can submit a benign image first to cache a safe moderation result, then submit a harmful image with a colliding identifier.
Significance (High): Highlights how naive serialization of non-text inputs allows attackers to smuggle harmful images past multimodal moderation filters.
Sources in support: Xiangfan Wu (Student, Ocean University of China and Tencent Zhuque Lab)
9. Salted SHA-256 and canonical serialization stop collisions
Timestamp: 00:29:45 to 00:32:51
To rebuild trust in cache equivalence, Xiangfan Wu proposes five defenses (T1-T5), starting with runtime hash salting (T1), cryptographic hash functions like SHA-256 (T2), and canonical multimodal serialization (T3). Runtime salts prevent offline precomputation of collisions, while upgrading to SHA-256 raises the theoretical collision compute cost to roughly $10^68, effectively eliminating hash collisions.
Significance (High): Gives infrastructure engineers concrete, low-overhead cryptographic and serialization fixes that completely neutralize hash-collision cache attacks.
Sources in support: Xiangfan Wu (Student, Ocean University of China and Tencent Zhuque Lab)
10. Post-hit LLM filters and vendor patches secure caches
Timestamp: 00:32:54 to 00:36:25
For semantic caches, Wu recommends stronger embedding models (T4)—which raise attacker poisoning costs by 6.5x—and a lightweight post-hit LLM verification filter (T5) that checks whether a cached answer truly matches the user's query before returning it. In testing, the post-hit filter cut poisoned cache hits from 66% to 27% while adding only 0.2 to 3 seconds of time-to-first-token latency.
Significance (High): Validates the research with real-world vendor remediation in vLLM and GPTCache and provides a practical checklist for securing production AI gateways.
Sources in support: Xiangfan Wu (Student, Ocean University of China and Tencent Zhuque Lab)
This analysis was generated by skim (skim.plus), an AI-powered content analysis platform by Credible AI. Scores and classifications represent the platform's AI-generated assessment and should be considered alongside other sources.