CVE-2026-59336
Patch Available.
This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.
Overview
Spring AI is a Spring project that provides a Spring-friendly API and abstractions for developing AI applications, with integrations for chat, embedding and image models from many providers, including Amazon Bedrock.
A server-side request forgery vulnerability (CVE-2026-59336) has been identified in the Spring AI Amazon Bedrock Converse module, which allows attackers to make the application fetch media URLs that point at internal network destinations its SSRF protections are meant to block.
Per OWASP: In a Server-Side Request Forgery (SSRF) attack, the attacker can abuse functionality on the server to read or update internal resources. The attacker can supply or modify a URL which the code running on the server will read or submit data to, and by carefully selecting the URLs, the attacker may be able to read server configuration such as AWS metadata, connect to internal services like http enabled databases or perform post requests towards internal services which are not intended to be exposed.
This issue affects multiple versions of Spring AI.
Details
Module Info
- Product: Spring AI
- Affected packages:
org.springframework.ai:spring-ai-bedrock-converse - 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-bedrock-converse
- 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 org.springframework.ai:spring-ai-bedrock-converse package in multiple versions of Spring AI.
When a multi-modal chat request is sent through BedrockProxyChatModel, image media given as an http:// or https:// URL are downloaded by the server through MediaFetcher and forwarded to Amazon Bedrock as bytes. These downloads are guarded against SSRF at several layers: BedrockProxyChatModel checks a String URL with URLValidator.isValidURLStrict before fetching, MediaFetcher's SsrfSafeDnsResolver rejects hostnames that resolve to internal addresses, and its plain and TLS socket factories check the resolved address again at connect time. Every one of these layers relies on the same predicate, URLValidator.isBlockedAddress:
public static boolean isBlockedAddress(InetAddress address) {
return address.isLoopbackAddress() || address.isLinkLocalAddress() || address.isSiteLocalAddress()
|| address.isAnyLocalAddress();
}The predicate only uses the JDK's loopback, link-local, site-local (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) and wildcard checks. It does not recognize other address ranges that are not globally reachable, such as the carrier-grade NAT range 100.64.0.0/10, 0.0.0.0/8, the reserved range 240.0.0.0/4, IPv6 unique local addresses (fc00::/7) and multicast addresses. It also checks IPv6 addresses only as IPv6, so an internal IPv4 address embedded in a 6to4, Teredo, NAT64 or IPv4-mapped IPv6 address is not unwrapped and checked.
A user who can supply media URLs to a chat request can therefore point the application at a host or IP literal in one of these ranges, and MediaFetcher will connect to it and read the response. By default BedrockProxyChatModel creates a MediaFetcher with no host allowlist, so this blocklist is the only protection, and BedrockProxyChatModel.Builder has no option to supply a MediaFetcher configured with an allowlist.
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
- kwakbumjun (finder)
- Daehyun Kang (finder)
- Arjun Basnet from Securin (finder)
- Michael Read (finder)
- ChangMin Lee (finder)