Vulnerabilities in pkg:maven/org.springframework.ai/spring-ai-client-chat

PACKAGE
Advisory Identifier: GHSA-5852-phmh-8fhr
Advisory Summary

CVE-2026-41713 is a HIGH (CVSS 8.2) prompt injection vulnerability (CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine) affecting Spring AI libraries in the Maven ecosystem. The issue involves prompt injection via memory poisoning in promptchatmemoryadvisor. Remediation is available by upgrading affected packages to version 1.0.7, 1.1.6.

2 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.springframework.ai/spring-ai-client-chat

2 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/org.springframework.ai/spring-ai-client-chat. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-5852-phmh-8fhr CVE-2026-41713 HIGH Spring AI: Prompt Injection via Memory Poisoning in PromptChatMemoryAdvisor
GHSA-q62f-h9x2-gcqc CVE-2026-41712 HIGH Spring AI: ChatMemory DEFAULT_CONVERSATION_ID causes unintended cross-user data leakage

CVE-2026-41713 at a Glance

CVE Identifier CVE-2026-41713
GHSA Identifier GHSA-5852-phmh-8fhr
Severity HIGH
CVSS v3.1 Base Score 8.2
CWE Classification CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine
Affected Product Spring AI
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 8.2

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2026-41713

To remediate this vulnerability, upgrade all affected Spring AI dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.springframework.ai:spring-ai-client-chat fixed: 1.0.7
<dependency>
    <groupId>org.springframework.ai</groupId>
    <artifactId>spring-ai-client-chat</artifactId>
    <version>1.0.7</version>
</dependency>
org.springframework.ai:spring-ai-client-chat fixed: 1.1.6
<dependency>
    <groupId>org.springframework.ai</groupId>
    <artifactId>spring-ai-client-chat</artifactId>
    <version>1.1.6</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.springframework.ai

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2026-41713, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.springframework.ai

Analyze the terminal output to locate any version of Spring AI in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.7), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.springframework.ai command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine, where the product uses a template engine to insert or process externally-influenced input, but it does not neutralize or incorrectly neutralizes special elements or syntax that can be interpreted as template expressions or other code directives when processed by the engine. In Spring AI, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

A malicious user could craft input that is stored in conversation memory and later interpreted by the model in an unintended way. Applications using the affected advisor with user-controlled input may be susceptible to manipulation of model behavior across conversation turns.

CVE-2026-41713 Affected Spring AI Versions

2 component(s)
Fixed Versions:
1.0.71.1.6
Product / Package Ecosystem Affected Versions Fixed Version
org.springframework.ai:spring-ai-client-chat
Maven
< 1.0.7
1.0.7
org.springframework.ai:spring-ai-client-chat
Maven
≥ 1.1.0-M1
< 1.1.6
1.1.6

References

Frequently Asked Questions

What is CVE-2026-41713?
CVE-2026-41713 is a security vulnerability in Spring AI involving Prompt Injection via Memory Poisoning in PromptChatMemoryAdvisor under CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine.
Which Spring AI versions are affected?
Affected versions include releases prior to 1.0.7, 1.1.6 across affected packages: org.springframework.ai:spring-ai-client-chat.
What version fixes CVE-2026-41713?
Upgrading to 1.0.7, 1.1.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is spring-ai-client-chat affected?
Yes, org.springframework.ai:spring-ai-client-chat is affected in releases prior to 1.0.7, 1.1.6. Upgrade your dependency to 1.0.7, 1.1.6 or later.
What is the CVSS score of CVE-2026-41713?
CVE-2026-41713 has a CVSS v3.1 base score of 8.2 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N.
What CWE is associated with CVE-2026-41713?
CVE-2026-41713 is classified under CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine (The product uses a template engine to insert or process externally-influenced input, but it does not neutralize or incorrectly neutralizes special elements or syntax that can be interpreted as template expressions or other code directives when processed by the engine.).
How can I check Maven dependencies for CVE-2026-41713?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.springframework.ai'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-5852-phmh-8fhr",
  "modified" : "2026-05-18T17:54:15Z",
  "published" : "2026-05-12T12:32:16Z",
  "aliases" : [ "CVE-2026-41713" ],
  "summary" : "Spring AI: Prompt Injection via Memory Poisoning in PromptChatMemoryAdvisor",
  "details" : "A malicious user could craft input that is stored in conversation memory and later interpreted by the model in an unintended way. Applications using the affected advisor with user-controlled input may be susceptible to manipulation of model behavior across conversation turns.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.ai:spring-ai-client-chat"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.ai:spring-ai-client-chat"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.1.0-M1"
      }, {
        "fixed" : "1.1.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-41713"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/spring-projects/spring-ai"
  }, {
    "type" : "WEB",
    "url" : "https://spring.io/security/cve-2026-41713"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1336" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-18T17:54:15Z",
    "nvd_published_at" : "2026-05-12T11:16:19Z"
  }
}