Cabeçalho penumbroso

CVE-2026-59361: Spring AI Redis Filter Injection and Fixes

CVE-2026-59361 affects the point where a Spring AI metadata filter becomes a Redis search query. If that filter enforces tenant isolation, a translation error can change which documents a similarity search is allowed to return. Review the filter converter and the application’s authorization predicate together: a correctly authenticated Redis connection does not establish that the generated query preserves the intended tenant boundary.

O Spring advisory, published November 19, 2026, identifies incomplete escaping in RedisFilterExpressionConverter and missing grouping around compound expressions. Applications incorporating untrusted values into Redis vector-store filter expressions are affected. Where metadata filters enforce authorization, the resulting search can expose documents and embeddings belonging to another tenant.

Use the corrected Spring AI support branch

TrackAffected releasesAdvisory correction
Open source 2.x2.0.0–2.0.22.0.3
Commercial 2.x2.0.0–2.0.22.0.2.1
Commercial 1.1.x1.1.0–1.1.91.1.10
Commercial 1.0.x1.0.0–1.0.101.0.11

Spring recommends the corresponding upgrade and states that no further mitigation steps are necessary. The review method below supplies application evidence after that correction; it does not imply the vendor requires an additional workaround. Resolve the deployed dependency and restart the serving application before recording the fix as active.

Literal values and Boolean structure are separate checks

O CVE record describes two consequential translation properties. First, characters with RediSearch syntax meaning must remain part of a literal metadata value instead of changing query structure. Second, compound conditions need grouping that preserves the expression’s intended meaning. Escaping a value alone does not establish correct operator precedence across several conditions.

A useful policy model is trusted tenant AND (optional category A OR optional category B). Every accepted result must satisfy the tenant condition, whichever optional category matches. This is a conceptual authorization rule, not an injection payload. A converter or application composition error that changes the grouping can defeat that rule without changing the tenant text itself.

Literal metadata values, trusted tenant identity and grouped category alternatives are separate properties needed to preserve intended filter meaning.
Conceptual authorization expression, not a RediSearch injection payload or an executed exploit.

O Redis integration documentation explains Spring AI’s portable filter expressions and configured metadata fields. Build the tenant predicate from authenticated server-side context; let callers choose only approved search refinements. A portable expression builder is an interface to the converter, not evidence that an affected converter serializes every expression safely.

Verify returned identities with synthetic tenant canaries

Use a disposable local index containing synthetic tenant-A and tenant-B documents with deliberately similar content. Give each document an unmistakable identifier and tenant tag. That similarity prevents an irrelevant result set from accidentally appearing to prove isolation. This is a proposed validation design; no regression or exploit was executed for this article.

Local checkExpected evidence
A requests an ordinary filtered searchReturned identifiers and tenant tags all belong to A.
Approved literal values contain punctuationThe generated query preserves them as data; the tenant boundary remains.
A combines permitted alternativesThe trusted tenant predicate encloses every OR branch.
B repeats the same semantic queryB receives only B-authorized identifiers.
Application rejects an invalid refinementRejection occurs before search; no broader fallback query is issued.

Retain the intended expression tree, sanitized generated query, resolved converter version, and returned document identifiers together. An empty response proves little unless the same fixture also includes an authorized positive result. Avoid copying real tenant documents or sensitive embeddings into diagnostic logs; synthetic records are sufficient to test this property.

Synthetic tenant-A and tenant-B documents with similar content let a local check compare returned identifiers against each caller’s permitted tenant.
A proposed evidence method using synthetic records and an authorized positive control; no test was executed.

Keep retrieval isolation distinct from answer caching

This CVE concerns the query used to retrieve Redis vector-store results. It is distinct from Spring AI semantic-cache scope issues: an isolated answer cache cannot repair a retrieval query that already selected another tenant’s documents. Conversely, fixing filter translation does not establish the authorization of every cache hit. Assign ownership and evidence to each boundary separately.

For an AI pentesting assessment, preserve the synthetic result matrix with the corrected application artifact. The official Penligent 3.0 video below demonstrates a general product workflow; it does not demonstrate this CVE’s exploitation or remediation.

Method: AI-assisted synthesis checked against Spring’s advisory, the CVE record, and Redis integration documentation on December 2, 2026. The policy model and evidence matrix are editorial analysis, not first-hand test results.

Compartilhe a postagem:
Publicações relacionadas
pt_BRPortuguese