CVE-2026-59351: Predictable Message-ID allows forged responses over the mail transport
MailSenderConnection correlates a SOAP response to its request solely by matching the request's JavaMail Message-ID against the In-Reply-To header of messages in the store mailbox. The default Message-ID generated by JavaMail is predictable, so an attacker who can deliver mail to the client's configured store mailbox and predict or observe that value can inject a forged response that the client accepts as the legitimate reply.
This issue only affects deployments where all the following are true:
The client uses the optional MailMessageSender transport for request/response calls. An attacker can deliver a message to the mailbox configured as the client's storeUri . That attacker can predict or observe the Message-ID of a request sent from the same client process.
Affected Software
Event History
Frequently Asked Questions
Which deployments are exposed to this issue?
Only clients using the optional MailMessageSender transport for request/response calls are affected. The attacker must also be able to deliver email to the mailbox configured as the client's storeUri and predict or observe a request Message-ID from the same client process.
What must an attacker do to exploit it?
The attacker must send a message to the configured store mailbox with an In-Reply-To header matching the target request's JavaMail Message-ID. If the client accepts that message as the matching response, the attacker can forge the response content.
Is a default configuration necessarily affected?
No. The issue requires use of the optional MailMessageSender transport and a reachable configured store mailbox, along with Message-ID prediction or observation. Deployments not using that request/response mail transport do not meet the stated affected conditions.
How can I determine whether a client is at risk?
Check whether the client uses MailMessageSender for request/response operations and identify its configured storeUri mailbox. It is at risk only if an attacker can deliver messages to that mailbox and can predict or observe Message-IDs generated by the same client process.