CVE-2026-59353
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 supports several transports, including HTTP, JMS, email and XMPP.
A content spoofing vulnerability (CVE-2026-59353) has been identified in the XMPP client transport of Spring Web Services, which allows attackers to inject a forged response that the client accepts as the legitimate reply to its request. Because the client does not check which address sent the response, an attacker who can observe the cleartext thread identifier of a request can answer it in place of the real service.
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: >=5.0.0 <=5.0.3, >=4.1.0 <=4.1.4, >=4.0.0 <=4.0.19, <=3.1.9
- 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. When a client sends a request through the XmppMessageSender transport, XmppSenderConnection waits for the reply by collecting incoming stanzas that pass the filter built in createPacketFilter():
@Override
protected void onReceiveBeforeRead() throws IOException {
StanzaFilter packetFilter = createPacketFilter();
StanzaCollector collector = this.connection.createStanzaCollector(packetFilter);
try {
Stanza packet = (this.receiveTimeout >= 0) ? collector.nextResult(this.receiveTimeout)
: collector.nextResult();
if (packet instanceof Message) {
this.responseMessage = (Message) packet;
}
...
}
catch (InterruptedException ex) {
throw new IOException(ex);
}
}
private StanzaFilter createPacketFilter() {
AndFilter andFilter = new AndFilter();
andFilter.addFilter(new StanzaTypeFilter(Message.class));
andFilter.addFilter(new ThreadFilter(this.requestMessage.getThread()));
return andFilter;
}The filter checks only that the stanza is a message and that its thread matches the thread of the outbound request. It never compares the sender JID of the incoming stanza with the address the request was sent to, so the first message from any sender that carries the right thread is taken as the response. The thread identifier travels in cleartext, so an attacker who can see it, for example through a federated server on the message's path, another client on the same account with message carbons enabled, or access to a message archive, can deliver a stanza with a matching thread to the client's JID. The client then reads the attacker's payload as the service's SOAP response. The collector is also never cancelled after the receive, which leaves the matching filter registered on the connection after the call has finished.
The issue affects only clients that use the XmppMessageSender transport for request/response calls.
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.