COMMON ATTACK PATTERN ENUMERATION AND CLASSIFICATIONLive MITRE record

CAPEC-231

Oversized Serialized Data Payloads

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.

Abstraction

Standard

Typical severity

High

Likelihood of attack

Medium

Understand the attack

What is this attack pattern?

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.

Extended description

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.

Execution flow

How does the attack proceed, step by step?

1

Explore

Attack step

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

Experiment

Attack step

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.

Requirements

What does the attack require?

Prerequisites

  • 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.

Skills required

  • Low: Denial of service
  • High: Arbitrary code execution

Resources required

Not stated in the MITRE record.

Detection

What are the indicators of the attack?

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

Impact

What does a successful attack lead to?

Resource Consumption

Affected scopes: Availability

Read Data

Affected scopes: Confidentiality

Execute Unauthorized Commands

Affected scopes: Confidentiality, Integrity, Availability

Gain Privileges

Affected scopes: Confidentiality, Access Control, Authorization

Defence

How is it prevented and mitigated?

1
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.
2
Perform validation on canonical data.
3
Pick a robust implementation of the serialized data parser.
4
Validate data against a valid schema or DTD prior to parsing.