CVE-2026-59337
Patch Available.
This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.
Overview
Spring AI is an application framework for AI engineering in the Spring ecosystem, providing portable abstractions and model integrations for chat, embedding, image and audio models from providers such as OpenAI, Anthropic, Mistral AI and DeepSeek.
An information exposure vulnerability (CVE-2026-59337) has been identified in the Spring AI chat and speech model implementations, which allows attackers with read access to application logs to obtain the full contents of user prompts. When a model returns no completion, choices or content, the full prompt, which may contain end-user personal data or proprietary system prompts, is written to the WARN log and can be shipped to centralized log stores with broader read access than the originating tenant.
Per OWASP: Access control enforces policy such that users cannot act outside of their intended permissions. Failures typically lead to unauthorized information disclosure, modification, or destruction of all data or performing a business function outside the user's limits.
This issue affects multiple versions of Spring AI.
Details
Module Info
- Product: Spring AI
- Affected packages:
org.springframework.ai:spring-ai-anthropic,org.springframework.ai:spring-ai-deepseek,org.springframework.ai:spring-ai-mistral-ai,org.springframework.ai:spring-ai-openai - Affected versions: >=1.0.0 <=1.0.10, >=1.1.0 <=1.1.9, >=2.0.0 <=2.0.2
- GitHub repository: https://github.com/spring-projects/spring-ai
- Published packages: https://central.sonatype.com/artifact/org.springframework.ai/spring-ai-openai
- Package manager: Maven
- Fixed in:
- OSS Spring AI 2.0.3
- NES for Spring AI
Vulnerability Info
This Low-severity vulnerability is found in the spring-ai-anthropic, spring-ai-deepseek, spring-ai-mistral-ai and spring-ai-openai packages in multiple versions of Spring AI. When the model provider's response carries no chat completion, no choices or no content, the chat model implementations log the entire Prompt object at WARN level before returning an empty ChatResponse. For example, OpenAiChatModel in the 1.x lines does the following:
var chatCompletion = completionEntity.getBody();
if (chatCompletion == null) {
logger.warn("No chat completion returned for prompt: {}", prompt);
return new ChatResponse(List.of());
}
List<Choice> choices = chatCompletion.choices();
if (choices == null) {
logger.warn("No choices returned for prompt: {}", prompt);
return new ChatResponse(List.of());
}
The same pattern is present in DeepSeekChatModel and MistralAiChatModel, and in the 2.0.x line also in AnthropicChatModel when a response has no content blocks. OpenAiAudioSpeechModel logs the full speech request, whose input is the text-to-speech prompt, at WARN level when no speech response is returned.
The Prompt string representation includes every message in the conversation, including system instructions and end-user input. WARN is enabled in default logging configurations, so any empty provider response writes this data to application logs. Those logs are commonly forwarded to centralized log stores whose readers are not entitled to see the end-user content or the application's system prompts (CWE-532: Insertion of Sensitive Information into Log File).
Mitigation
Only recent versions of Spring AI receive community support. Older lines are End-of-Life and will not receive public updates to address this issue.
Users of the affected components should apply one of the following mitigations:
- Upgrade to a currently supported version of Spring AI.
- Leverage a commercial support partner like HeroDevs for post-EOL security support.
Credits
- ZXBR1024 (finder)