CVE-2026-59351

Content Spoofing
Affects
Spring Web Services
in
Spring
No items found.
Versions
<=3.1.9, >=4.0.0 <=4.0.19, >=4.1.0 <=4.1.4, >=5.0.0 <=5.0.3

Patch Available.

Exclamation circle icon
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

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.
Vulnerability Details
Severity
Level
CVSS Assessment
Low
>=0 <4
Medium
>=4 <6
High
>=6 <8
Critical
>=8 <10
Medium
ID
CVE-2026-59351
PROJECT Affected
Spring Web Services
Versions Affected
<=3.1.9, >=4.0.0 <=4.0.19, >=4.1.0 <=4.1.4, >=5.0.0 <=5.0.3
NES Versions Affected
Published date
November 19, 2026
≈ Fix date
Category
Content Spoofing
Vex Document
Download VEXHow do I use it?
Sign up for the latest vulnerability alerts fixed in
NES for Spring
Rss feed icon
Subscribe via RSS
or

By submitting the form I acknowledge receipt of our Privacy Policy.

Thanks for signing up for our Newsletter! We look forward to connecting with you.
Oops! Something went wrong while submitting the form.