cd /news/ai-safety/spring-ai-s-redis-cache-needs-a-tena… · home › topics › ai-safety › article
[ARTICLE · art-180081] src=dev.to ↗ pub= topic=ai-safety verified=true sentiment=↓ negative

Spring AI's Redis cache needs a tenant boundary, not only a prompt hash

A security advisory, CVE-2026-59417, warns that Spring AI's SemanticCacheAdvisor keys cached responses only by a hash of the system prompt, so applications sharing the advisor across users or tenants can serve one user's cached answer to another or let an attacker seed responses for later users. The flaw affects Spring AI 2.0.0–2.0.2, 1.1.0–1.1.9 and 1.0.0–1.0.10, with an open-source fix in 2.0.3 and enterprise-only fixes for older branches; the fix requires applications to supply a SemanticCacheScopeResolver that draws its scope from a trusted source such as the authenticated principal. The advisory also notes that advisor-written cache entries do not expire, so teams must invalidate records created under the old key after upgrading.

recommendation

Scope semantic caches with a resolver fed only by trusted identity such as the authenticated principal, never by headers or model output, and invalidate pre-fix entries after upgrading.

more in playbook: Securing agents and AI tools
by read2 min views5 publishedDec 2, 2026

Spring AI applications that share a SemanticCacheAdvisor across end users can return one user's cached answer to another. CVE-2026-59417 describes a cache pool keyed only by the hash of the system prompt. That key does not separate users, sessions, or tenants, so similar questions can converge on the same stored response.

The affected Spring AI ranges are 2.0.0 through 2.0.2, 1.1.0 through 1.1.9, and 1.0.0 through 1.0.10. The open-source fix is 2.0.3; Spring published enterprise-only fixes for the older branches. The advisory states that entries written through the advisor do not expire.

Two failure modes follow. A response containing one user's data may be served to another user. An attacker may also seed a response and have later users receive it. Both require the application to share the advisor in a way that permits reuse across trust boundaries.

The fix makes applications provide a SemanticCacheScopeResolver. That resolver determines where a cached answer may be shared. A trusted source such as the authenticated principal can feed it. A request parameter, model-generated tenant name, or other user-controlled value should not.

Teams should decide whether the cache is per user, per tenant, or global only for content that contains no protected or personalized material. The decision belongs beside authorization logic because the cache becomes part of the response path. A cache hit bypasses the model call and every check that would have run inside it.

Upgrade to a fixed release and configure the new scope explicitly. Then invalidate entries created under the old key. Changing the resolver does not repair records that are already shared, and the advisory notes that advisor-written entries do not expire on their own.

Review the code path that constructs the advisor. Confirm that the resolver cannot receive a tenant identifier from an untrusted header or prompt. Also inspect logs and traces for cache hits that cross account or tenant identifiers. Avoid recording prompts or responses in those logs while investigating.

If an upgrade is delayed, do not use SemanticCacheAdvisor for applications that serve more than one end user or tenant. Disabling the shared cache is a temporary containment step and needs an explicit operational owner.

── more in #ai-safety 4 stories · sorted by recency
── more on @spring ai 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/spring-ai-s-redis-ca…] indexed:0 read:2min 2026-12-02 · —