Executive brief
Spring AI is a framework for building AI-powered applications that includes a Semantic Cache feature to optimize performance by reusing previous AI responses. A flaw in how the cache isolates responses between different system prompts allows cached results from one context to be inappropriately returned for unrelated contexts, potentially exposing incorrect or sensitive information across different use cases.
Technical details
The vulnerability is a context isolation bypass in Spring AI's Semantic Cache implementation. The context hash algorithm used to segregate cached responses based on system prompts is insufficient, allowing responses cached for one system prompt to be retrieved and served in unrelated contexts with different system prompts. This is a logical flaw in the cache key derivation rather than a cryptographic weakness. An attacker does not require authentication or network-level access beyond normal application use; they simply need to interact with the cached AI system in a way that triggers retrieval of responses from a different context. The impact is information disclosure—a user could receive AI-generated responses that were cached for a different system prompt, potentially revealing sensitive context or instructions. Patches are available in versions after 2.0.0.
Affected products
- Pivotal Spring AI 2.0.0
Timeline
- 2026-08-21: disclosed