CVE-2026-59349: Spring Web Services Memory Consumption via Oversized Incoming Messages
SaajSoapMessageFactory , AxiomSoapMessageFactory , and DomPoxMessageFactory do not limit the size of the incoming message they parse.
A remote client that sends an oversized message to a Spring Web Services endpoint can cause the application to consume an amount of memory proportional to the data it sends, which may result in an OutOfMemoryError for the request being processed.
Limiting the size of incoming requests is commonly the responsibility of the infrastructure in front of the application, such as a reverse proxy or an API gateway.
For the JMS, Mail, and XMPP transports, the message is already fully received by the underlying client library before Spring Web Services processes it, and its size is subject to the limits of the broker or server.
On the client side, an oversized response requires the application to call a malicious or compromised server.
This issue only affects deployments where all the following are true:
The application receives messages over HTTP from untrusted clients.
No request body size limit is enforced before the message reaches Spring Web Services.
Fixed versions harden the message factories by applying a default maximum message size of 10MB, which can be configured via the maxMessageSize property of each factory.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
Configure maxMessageSize to limit the size of incoming messages; fixed versions apply a 10MB default.
SaajSoapMessageFactory, AxiomSoapMessageFactory, and DomPoxMessageFactory maxMessageSize = 10MB - Compensating control
Limit incoming HTTP request body size at the reverse proxy or API gateway in front of the application.
Event History
Frequently Asked Questions
Which deployments are exposed to this issue?
A deployment is affected only when it receives HTTP messages from untrusted clients and no request-body size limit is enforced before requests reach Spring Web Services. The affected message factories are SaajSoapMessageFactory, AxiomSoapMessageFactory, and DomPoxMessageFactory.
Can an unauthenticated remote attacker trigger the problem?
Yes. An untrusted remote HTTP client can send an oversized message, causing memory consumption proportional to the message data and potentially an OutOfMemoryError while that request is processed.
What can be done before updating the application?
Enforce a request-body size limit in infrastructure in front of the application, such as a reverse proxy or API gateway, so oversized messages do not reach Spring Web Services. Fixed versions also apply a default maximum message size of 10 MB in the message factories.
Are JMS, Mail, XMPP, or outbound client use affected in the same way?
For JMS, Mail, and XMPP, the underlying client library fully receives the message before Spring Web Services processes it, and the applicable size limits are those of the broker or server. On the client side, exploitation requires the application to call a malicious or compromised server that returns an oversized response.