---
title: "CAPEC-230: Serialized Data with Nested Payloads"
url: https://radicalnotion.ai/capec/capec-230
type: capec
description: "Applications often need to transform data in and out of a data format (e.g., XML and YAML) by using a 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. Many data format languages allow the definition of macro-like structures that can be used to simplify the creation of complex structures. By nesting these structures, causing the data to be repeatedly substituted, an adversary can cause the parser to consume more resources while processing, causing excessive memory consumption and CPU utilization."
updated: 2026-06-01
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CAPEC-230: Serialized Data with Nested Payloads

- **Abstraction:** Standard
- **Status:** Draft
- **Typical severity:** High
- **Likelihood of attack:** Medium
- **CAPEC catalog version:** 3.9

## Description

Applications often need to transform data in and out of a data format (e.g., XML and YAML) by using a 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. Many data format languages allow the definition of macro-like structures that can be used to simplify the creation of complex structures. By nesting these structures, causing the data to be repeatedly substituted, an adversary can cause the parser to consume more resources while processing, causing excessive memory consumption and CPU utilization.

An adversary's goal is to leverage parser failure to their advantage. In most cases this type of an attack will result in a Denial of Service due to an application becoming unstable, freezing, or crashing. However it may be possible to cause a crash resulting in arbitrary code execution, leading to a jump from the data plane to the control plane \[REF-89\]. This attack is most closely associated with web services using SOAP or a Rest API, because remote service requesters can post malicious payloads to the service provider. The main weakness is that the service provider generally must inspect, parse, and validate the messages to determine routing, workflow, security considerations, and so on. It is exactly these inspection, parsing, and validation routines that this attack targets. 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.

## Alternate terms

- XML Denial of Service (XML DoS)

## Execution flow

### Step 1: Explore

An adversary determines the input data stream that is being processed by a data parser that supports using substitution on the victim's side.

### Step 2: Exploit

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

## Prerequisites

- An application's user-controllable data is expressed in a language that supports subsitution.
- An application does not perform sufficient validation to ensure that user-controllable data is not malicious.

## Indicators

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

## Consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Availability | Resource Consumption | - |
| Confidentiality | Read Data | - |
| Confidentiality, Integrity, Availability | Execute Unauthorized Commands | - |
| Confidentiality, Access Control, Authorization | Gain Privileges | - |

## Mitigations

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

## Related weaknesses (CWE)

- [CWE-20](https://radicalnotion.ai/cwe/cwe-20): Improper Input Validation
- [CWE-112](https://radicalnotion.ai/cwe/cwe-112): Missing XML Validation
- [CWE-674](https://radicalnotion.ai/cwe/cwe-674): Uncontrolled Recursion
- [CWE-770](https://radicalnotion.ai/cwe/cwe-770): Allocation of Resources Without Limits or Throttling

## Related attack patterns

| Relationship | CAPEC | Name |
| --- | --- | --- |
| Parent | [CAPEC-130](https://radicalnotion.ai/capec/capec-130) | Excessive Allocation |
| Child | [CAPEC-197](https://radicalnotion.ai/capec/capec-197) | Exponential Data Expansion |
| Child | [CAPEC-491](https://radicalnotion.ai/capec/capec-491) | Quadratic Data Expansion |

## Frequently asked questions

### What is CAPEC-230?

Applications often need to transform data in and out of a data format (e.g., XML and YAML) by using a 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. Many data format languages allow the definition of macro-like structures that can be used to simplify the creation of complex structures. By nesting these structures, causing the data to be repeatedly substituted, an adversary can cause the parser to consume more resources while processing, causing excessive memory consumption and CPU utilization.

### How does a Serialized Data with Nested Payloads attack work?

It typically unfolds over 2 phases. It begins with: An adversary determines the input data stream that is being processed by a data parser that supports using substitution on the victim's side.

### How do you prevent CAPEC-230?

Carefully validate and sanitize all user-controllable data prior to passing it to the data parser routine. Ensure that the resultant data is safe to pass to the data parser.

### What weaknesses does CAPEC-230 target?

CAPEC-230 exploits 4 CWE weaknesses: CWE-20 (Improper Input Validation), CWE-112 (Missing XML Validation), CWE-674 (Uncontrolled Recursion) and CWE-770 (Allocation of Resources Without Limits or Throttling).

### How severe is CAPEC-230?

MITRE rates CAPEC-230 as High severity with medium likelihood of attack.

Primary source: [MITRE CAPEC](https://capec.mitre.org/data/definitions/230.html)

---

Source: [RadicalNotion.AI](https://radicalnotion.ai/capec/capec-230). Licensed CC BY-NC 4.0; attribute RadicalNotion.AI and link the source page when you reuse this data.
