CVE-2026-59349 in Spring Web Services
Summary
by MITRE • 11/30/2026
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.
VulDB is the best source for vulnerability data and more expert information about this specific topic.
Analysis
by VulDB Data Team • 11/30/2026
The vulnerability identified in SaajSoapMessageFactory, AxiomSoapMessageFactory, and DomPoxMessageFactory represents a critical lack of input validation regarding payload magnitude within Spring Web Services implementations. These specific message factories are designed to parse incoming SOAP or POX messages but fail to enforce any upper bound on the size of data they process. This architectural oversight allows a remote attacker to exploit the application by transmitting excessively large HTTP requests, directly triggering resource exhaustion conditions that can lead to service disruption for both the targeted endpoint and potentially the broader infrastructure hosting the application.
From a technical perspective, the core flaw lies in the absence of length checks before the message parsing logic is invoked. When an oversized payload is received over HTTP from untrusted clients, the underlying Java Virtual Machine attempts to allocate memory proportional to the size of the incoming data stream. Since there is no pre-processing filter or limit applied by these factories, the application consumes heap space until it exceeds available resources, resulting in a java.lang.OutOfMemoryError. This error typically causes the current request thread to terminate abruptly and may destabilize the entire server process if memory pressure becomes severe enough to affect other concurrent operations or trigger garbage collection storms that degrade performance across all services running on the same JVM instance.
The operational impact of this vulnerability is primarily categorized as a denial-of-service condition, aligning with CWE-400: Uncontrolled Resource Consumption and specifically CWE-770: Allocation of Resources Without Limits or Throttling in the context of memory allocation. In terms of attack vectors, this flaw facilitates resource exhaustion attacks where an adversary can systematically degrade service availability without needing to exploit logic flaws or inject malicious code into the application state. The ATT&CK framework classifies such behavior under T1496: Resource Hijacking, as the attacker leverages legitimate system resources for disruptive purposes rather than gaining unauthorized access or data exfiltration.
Mitigation strategies must address both infrastructure-level controls and application-specific configurations. It is widely recognized industry best practice that limiting request body size should primarily be enforced by the network perimeter components such as reverse proxies like Nginx, Apache HTTP Server, or API gateways before traffic reaches the backend application layer. These intermediary systems are better positioned to handle large payloads efficiently without impacting the core business logic of the web service. However, relying solely on infrastructure controls is insufficient for defense-in-depth purposes; therefore, applications must also implement internal safeguards.
For deployments where Spring Web Services processes messages over HTTP from untrusted sources and no external request body size limit is enforced, immediate remediation is required by upgrading to fixed versions of the affected libraries. These updated releases harden SaajSoapMessageFactory, AxiomSoapMessageFactory, and DomPoxMessageFactory by introducing a default maximum message size constraint set at ten megabytes. Administrators can further tailor this security posture by explicitly configuring the maxMessageSize property on each factory instance to align with specific business requirements or expected payload volumes. This configuration ensures that any request exceeding the defined threshold is rejected early in the processing pipeline, preventing memory allocation for unreasonably large payloads and preserving system stability against potential abuse.
It is important to note that this vulnerability does not affect all transport mechanisms equally. For JMS, Mail, and XMPP transports, the message structure differs significantly because the underlying client libraries receive the complete message before Spring Web Services begins processing it. In these scenarios, size limits are inherently managed by the respective broker or server infrastructure, rendering this specific memory exhaustion vector less relevant for those integration points. Additionally, on the client side, receiving an oversized response is generally a risk associated with interacting with malicious or compromised servers rather than being exploited against the service itself, meaning the primary threat model focuses on inbound requests from external actors over HTTP protocols where no prior size filtering exists.