An adversary injects oversized serialized data payloads into a parser during data processing to produce adverse effects upon the parser such as exhausting system resources and arbitrary code execution.

Applications often need to transform data in and out of serialized data formats, such as XML and YAML, by using a data parser. It may be possible for an adversary to inject data that may have an adverse effect on the parser when it is being processed. By supplying oversized payloads in input vectors that will be processed by the parser, an adversary can cause the parser to consume more resources while processing, causing excessive memory consumption and CPU utilization, and potentially cause execution of arbitrary code. An adversary's goal is to leverage parser failure to their advantage. DoS is most closely associated with web services, SOAP, and Rest, because remote service requesters can post malicious data payloads to the service provider designed to exhaust the service provider's memory, CPU, and/or disk space. This attack exploits the loosely coupled nature of web services, where the service provider has little to no control over the service requester and any messages the service requester sends.

XML Denial of Service (XML DoS)

Medium
High

1
Explore
An adversary determines the input data stream that is being processed by an serialized data parser on the victim's side.

2
Experiment
An adversary crafts input data that may have an adverse effect on the operation of the data parser when the data is parsed on the victim's system.

An application uses an parser for serialized data to perform transformation on user-controllable data.
An application does not perform sufficient validation to ensure that user-controllable data is safe for a data parser.

Denial of service
Arbitrary code execution

Bad data is passed to the serialized data parser (possibly repeatedly), possibly making it crash or execute arbitrary code.

Availability
Resource Consumption

Confidentiality
Read Data

Confidentiality
Integrity
Availability
Execute Unauthorized Commands

Confidentiality
Access Control
Authorization
Gain Privileges

Carefully validate and sanitize all user-controllable serialized data prior to passing it to the parser routine. Ensure that the resultant data is safe to pass to the parser.
Perform validation on canonical data.
Pick a robust implementation of the serialized data parser.
Validate data against a valid schema or DTD prior to parsing.

In many cases this type of an attack will result in an XML Denial of Service (XDoS) or similar Denial of Service (DoS) due to an application becoming unstable, freezing, or crashing. However it is possible to cause a crash resulting in arbitrary code execution, leading to a jump from the data plane to the control plane [REF-89].
The main weakness in serialized data related DoS is that the service provider generally must inspect, parse, and validate the data messages to determine routing, workflow, security considerations, and so on. It is exactly these inspection, parsing, and validation routines that DoS targets.

CAPEC Content Team
The MITRE Corporation
2014-06-23

CAPEC Content Team
The MITRE Corporation
2019-09-30
Updated Alternate_Terms, Description, Execution_Flow, Related_Attack_Patterns

CAPEC Content Team
The MITRE Corporation
2020-07-30
Updated @Name, Description, Execution_Flow, Indicators, Mitigations, Prerequisites

CAPEC Content Team
The MITRE Corporation
2020-12-17
Updated Description, Notes

CAPEC Content Team
The MITRE Corporation
2021-06-24
Updated Related_Weaknesses

CAPEC Content Team
The MITRE Corporation
2022-09-29
Updated Description, Extended_Description

XML Oversized Payloads