Zing Forum

Reading

CacheProbe: A Study on Audit Attacks Against Prompt Cache Isolation in LLM Gateway APIs

This article provides an in-depth analysis of the CacheProbe research, revealing that API gateway architectures like OpenRouter may bypass the prompt cache isolation mechanisms of LLM providers, leading to cross-user data leakage risks. The study proposes a timing attack method targeting prompt caches, which has important warning implications for AI security in multi-tenant environments.

LLM安全提示缓存API网关时序攻击数据隔离OpenRouter侧信道攻击多租户安全
Published 2026-05-29 06:06Recent activity 2026-06-01 10:48Estimated read 6 min
CacheProbe: A Study on Audit Attacks Against Prompt Cache Isolation in LLM Gateway APIs
1

Section 01

CacheProbe Research Guide: Revealing Prompt Cache Isolation Vulnerabilities in LLM Gateway APIs

Core of the CacheProbe Research

This article focuses on the prompt cache isolation security issue in LLM gateway APIs, published by Gu et al. at ICML 2025 (arXiv source, released in May 2026). The research reveals that third-party API gateways like OpenRouter may bypass the prompt cache isolation mechanisms of LLM providers, leading to cross-user data leakage risks. The proposed CacheProbe audit method is based on timing attacks, which has important warning implications for AI security in multi-tenant environments.

2

Section 02

Research Background: The Rise of Prompt Caching and Its Security Concerns

Over the past year, prompt caching technology in LLM inference APIs has rapidly gained popularity, reducing latency and cutting costs by reusing KV caches. However, behind this technical convenience lie security risks: when multiple tenants share a cache, time differences between cache hits and misses (timing attacks) or metadata leaks may become channels for data theft.

3

Section 03

Core Issue: Gateway Architecture Undermines Isolation Commitments

Mainstream LLM providers (e.g., OpenAI) implement cache isolation by account/organization, but third-party gateways (e.g., OpenRouter) use shared organizational credentials to access underlying providers, which may lead to global cache sharing—user A's prompt cache may be hit by user B, causing cross-user cache pollution and violating data isolation expectations.

4

Section 04

Attack Principle: Technical Mechanism of CacheProbe

The CacheProbe audit method is based on two key observations:

  1. Timing Side Channel: Cache hits result in faster responses, while misses are slower; attackers can infer other users' prompt prefixes through time differences.
  2. Metadata Leakage: Some implementations leak cache status (e.g., hit or miss) via response headers or error messages.
5

Section 05

Experimental Findings: Risk Assessment in OpenRouter Scenarios

Experiments targeting OpenRouter validated three hypotheses:

  1. Shared credentials cause the underlying provider to treat all gateway traffic as from the same organization.
  2. Insufficient isolation of end-users in cache key logic leads to cross-user sharing.
  3. Attackers can detect isolation vulnerabilities via timing analysis. The results show that gateway architectures may weaken or invalidate underlying isolation mechanisms.
6

Section 06

Security Implications: Risks to Be Noted by Stakeholders

  • End Users: When using LLMs via gateways, prompt prefixes may be probed; sensitive information should not be placed in prefixes, and adding random prefixes is recommended.
  • Gateway Operators: Need to audit isolation mechanisms, assign independent credentials, implement additional isolation layers, and disclose risks.
  • LLM Providers: Strengthen cache key logic, provide fine-grained control, and accept third-party audits.
7

Section 07

Defense Recommendations: Multi-Layer Mitigation Measures and Best Practices

Architecture Level

  1. Credential Isolation: Assign independent credentials to users.
  2. Cache Namespace Isolation: Embed user identifiers in cache keys.
  3. Gateway-Level Caching: Use an independent caching system.

Application Level

  1. Prompt Prefix Randomization.
  2. Sensitive Information Postponement.
  3. Response Timing Obfuscation.

Audit and Monitoring

  1. Regular audits using CacheProbe.
  2. Anomaly query pattern detection.
  3. Public disclosure of cache security practices.
8

Section 08

Conclusion and Outlook: Insights for AI Infrastructure Security

CacheProbe proves that timing analysis can detect isolation flaws in multi-tenant environments, reminding us that performance optimization must be considered alongside security. Future directions: Expand to more gateways/proxies, develop automated audit tools, and explore privacy-preserving caching mechanisms (e.g., differential privacy caching).