CVE-2026-59348
Incomplete Escaping in RedisChatMemoryRepository Query Methods
Description
RedisChatMemoryRepository is vulnerable to RediSearch query injection when processing untrusted input.
The repository builds RediSearch queries from caller-supplied conversation content and metadata values. A prior fix added escaping to one of these query-building paths, but other paths that construct queries the same way were left unescaped. An attacker who controls a value passed into one of the unescaped paths can include RediSearch query syntax that alters the structure of the executed query rather than being treated as plain search text. This can broaden a search beyond its intended scope, allowing retrieval of, or interference with, chat messages outside the caller's own conversation. Any application that passes end-user-supplied content or metadata into RedisChatMemoryRepository's search methods is impacted.
Affected Maven artifacts (1)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.springframework.ai » spring-ai-model-chat-memory-repository-redis | >= 2.0.0, < 2.0.3 | 2.0.3 |
Blast radius
66% of the dependent artifacts (2) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 3 |
| 2 hops | 2 |
Most used dependents
- org.springframework.ai » spring-ai-starter-model-chat-memory-repository-redis2 usages
- io.gitee.cdhong » ai-memory-rag0 usages
- me.kezhenxu94 » spring-agent-persistence-redis0 usages
Computed from the dependency graph of build 20261128.0605 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
