CVE-2026-59351
Patch Available.
This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.
Overview
Spring Web Services is a Spring project focused on creating document-driven web services. It facilitates contract-first SOAP service development and offers several client transports, including an optional email transport.
A content spoofing vulnerability (CVE-2026-59351) has been identified in the mail transport of Spring Web Services, which allows attackers who can deliver mail to a client's response mailbox to inject a forged SOAP response that the client accepts as the legitimate reply.
Per OWASP: Content spoofing, also referred to as content injection, “arbitrary text injection” or virtual defacement, is an attack targeting a user made possible by an injection vulnerability in a web application.
This issue affects multiple versions of Spring Web Services.
Details
Module Info
- Product: Spring Web Services
- Affected packages:
org.springframework.ws:spring-ws-support - Affected versions: <=3.1.9, >=4.0.0 <=4.0.19, >=4.1.0 <=4.1.4, >=5.0.0 <=5.0.3
- GitHub repository: https://github.com/spring-projects/spring-ws
- Published packages: https://central.sonatype.com/artifact/org.springframework.ws/spring-ws-support
- Package manager: Maven
- Fixed in:
- OSS Spring Web Services 5.0.4
- NES for Spring Web Services
Vulnerability Info
This Medium-severity vulnerability is found in the org.springframework.ws:spring-ws-support package in multiple versions of Spring Web Services. It only matters for clients that use the optional MailMessageSender transport for request/response calls.
MailSenderConnection sends each SOAP request as a plain JavaMail MimeMessage, so the request's Message-ID header is the value JavaMail generates by default:
this.requestMessage = new MimeMessage(this.session);
this.requestMessage.setRecipient(Message.RecipientType.TO, this.to);To receive the reply, the connection opens the mailbox configured as the client's storeUri and takes the first message whose In-Reply-To header equals that Message-ID:
String requestMessageId = this.requestMessage.getMessageID();
...
SearchTerm searchTerm = new HeaderTerm(MailTransportConstants.HEADER_IN_REPLY_TO, requestMessageId);
Message[] responses = this.folder.search(searchTerm);
if (responses.length > 0) {
...
this.responseMessage = responses[0];
}The In-Reply-To match is the only check made on the response. The sender is not verified, and JavaMail's default Message-ID is predictable rather than random. An attacker who can deliver mail to the client's storeUri mailbox and can predict or observe the Message-ID of a request sent from the same client process can place a message with a matching In-Reply-To header in that mailbox. The client then reads the attacker's message as the service's SOAP response and hands its forged content to the application, which affects the integrity of the data the client acts on.
Mitigation
Only recent versions of Spring Web Services 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 Web Services.
- Leverage a commercial support partner like HeroDevs for post-EOL security support.