CVE-2026-59361
Patch Available.
This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.
Overview
Spring AI is an application framework for AI engineering that applies Spring design principles such as portability and modular design to AI applications, with portable APIs for chat models, embedding models and vector stores such as Redis.
An information exposure vulnerability (CVE-2026-59361) has been identified in the Redis vector store of Spring AI, which allows attackers to inject RediSearch query syntax through metadata filter values. In applications that rely on metadata filters to enforce authorization or tenant isolation, a crafted value can broaden a similarity search and return documents and embeddings that belong to other tenants.
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-redis-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-redis-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-redis-store package in multiple versions of Spring AI. RedisVectorStore uses RedisFilterExpressionConverter to translate Spring AI filter expressions into RediSearch query clauses. Values for TAG fields are written inside {...} and values for TEXT fields inside (...), and each value is escaped before it is appended to the query string:
private String textStringValue(Expression expression, Value value) {
String delimiter = tagValueDelimiter(expression);
if (value.value() instanceof List<?> list) {
return list.stream()
.map(String::valueOf)
.map(RediSearchUtil::escapeQuery)
.collect(Collectors.joining(delimiter));
}
return RediSearchUtil.escapeQuery(String.valueOf(value.value()));
}
private String escapeTagValue(String value) {
StringBuilder sb = new StringBuilder(value.length());
for (int i = 0; i < value.length(); i++) {
char c = value.charAt(i);
switch (c) {
case '\\', '$', '|', '{', '}', '(', ')', '[', ']', '-', '\'' -> sb.append('\\').append(c);
default -> sb.append(c);
}
}
return sb.toString();
}The escaping covers only part of the RediSearch query syntax. For TAG fields, escapeTagValue leaves * unescaped, so a value such as aa* becomes a prefix wildcard and matches every tag that starts with aa instead of the literal value. For TEXT fields, RediSearchUtil.escapeQuery escapes query separators but not the backslash itself, so a backslash in the value can consume the escape that follows it and turn an escaped ) or other separator back into query syntax. A value that reaches a filter expression from an untrusted source, for example a tenant identifier or a user-chosen search attribute, can therefore change the structure of the executed query rather than being matched as literal text. When the filter is the mechanism that restricts results to the current user or tenant, the similarity search returns documents and embeddings outside that 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
- Raphael Zanarelli (finder)