CVE-2026-59344
Patch Available.
This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.
Overview
Spring AI is a framework for building AI-powered Java applications with Spring, providing portable APIs for chat models, embedding models and vector stores, including a metadata filter expression language for similarity search.
An information exposure vulnerability (CVE-2026-59344) has been identified in the Coherence vector store of Spring AI, which allows attackers who control a metadata filter expression to bypass metadata-based restrictions, such as tenant or document-scoping filters. This can disclose documents that should have been excluded from search results.
Per OWASP: Access control enforces policy such that users cannot act outside of their intended permissions. Failures typically lead to unauthorized information disclosure, modification, or destruction of all data or performing a business function outside the user's limits.
This issue affects multiple versions of Spring AI.
Details
Module Info
- Product: Spring AI
- Affected packages:
org.springframework.ai:spring-ai-coherence-store - Affected versions: >=1.0.0 <=1.0.10, >=1.1.0 <=1.1.9, >=2.0.0 <=2.0.2
- GitHub repository: https://github.com/spring-projects/spring-ai
- Published packages: https://central.sonatype.com/artifact/org.springframework.ai/spring-ai-coherence-store
- Package manager: Maven
- Fixed in:
- OSS Spring AI 2.0.3
- NES for Spring AI
Vulnerability Info
This High-severity vulnerability is found in the org.springframework.ai:spring-ai-coherence-store package in multiple versions of Spring AI. CoherenceVectorStore translates the portable Spring AI filter expression passed to SearchRequest.filterExpression(...) into a Coherence Filter with CoherenceFilterExpressionConverter. For every comparison (==, !=, >, >=, <, <=, in, nin), the converter builds the value extractor directly from the filter key:
private ValueExtractor extractor(Operand op) {
return new ChainedExtractor(new UniversalExtractor<>("metadata"), new UniversalExtractor<>(((Key) op).key()));
}The key text is not validated as a literal metadata field name. Coherence's UniversalExtractor resolves its name reflectively: a name ending in () is called as a method, and a plain name is first tried as a property accessor on the target before it is treated as a map key. Because the second extractor runs against the document's metadata Map, a key such as empty or class calls isEmpty() or getClass() on the map instead of looking up a metadata field of that name. The resulting comparison is evaluated against the map's own state rather than against the stored metadata value, so a filter can match documents it was meant to exclude.
Applications that build filter expressions from externally influenced input, including expressions generated by a language model, are exposed: an attacker who can shape such an expression can make metadata restrictions, such as tenant or document-scoping filters, ineffective and retrieve documents from outside their intended scope.
Mitigation
Only recent versions of Spring AI receive community support. Older lines are End-of-Life and will not receive public updates to address this issue.
Users of the affected components should apply one of the following mitigations:
- Upgrade to a currently supported version of Spring AI.
- Leverage a commercial support partner like HeroDevs for post-EOL security support.
Credits
- Tran Hoang Phuc Quan from Viettel Networks (finder)