Get ahead
VMware offers training and certification to turbo-charge your progress.
Learn moreRedisVectorStore is vulnerable to RediSearch query injection when metadata filter expressions are built from untrusted values.
RedisFilterExpressionConverter translates Spring AI filter expressions into RediSearch query clauses, but escapes only a subset of the characters that RediSearch treats as query syntax. A value that reaches a filter expression from an untrusted source can therefore change the structure of the executed query instead of being matched as literal text. Compound filter expressions are additionally emitted without grouping, so RediSearch operator precedence can alter the effective meaning of a filter that combines several conditions.
In applications that rely on metadata filters to enforce authorization or tenant isolation, this can broaden a similarity search beyond its intended scope and return documents and embeddings belonging to other tenants. Any application that incorporates user-supplied values into Redis vector store filter expressions is impacted.
Spring AI:
| Fix version | Availability |
|---|---|
| 2.0.3 | OSS |
| 2.0.2.1 | Enterprise Support Only |
| 1.1.10 | Enterprise Support Only |
| 1.0.11 | Enterprise Support Only |
No further mitigation steps are necessary.
The issue was reported responsibly by Raphael Zanarelli - https://github.com/zanarellidev
To report a security vulnerability for a project within the Spring portfolio, see the Security Policy