CAPEC-231: Oversized Serialized Data Payloads
Also known as: XML Denial of Service (XML DoS)
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.
Last updated
Overview
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.
How the attack works
The phases an attacker typically follows.
- Step 1Explore
An adversary determines the input data stream that is being processed by an serialized data parser on the victim's side.
- Step 2Experiment
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.
What the attacker needs
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 skill: Denial of service
- High skill: Arbitrary code execution
Consequences
What a successful CAPEC-231 attack can achieve.
Resource Consumption
Affects: Availability
Read Data
Affects: Confidentiality
Execute Unauthorized Commands
Affects: Confidentiality, Integrity, Availability
Gain Privileges
Affects: Confidentiality, Access Control, Authorization
How to mitigate it
Defenses that reduce the risk of CAPEC-231.
- 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.
How to detect it
Indicators that this attack may be underway.
- Bad data is passed to the serialized data parser (possibly repeatedly), possibly making it crash or execute arbitrary code.
Terminology & mappings
Alternate terms
- XML Denial of Service (XML DoS)
Frequently asked questions
Common questions about CAPEC-231.
- What is CAPEC-231?
- 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.
- How does a Oversized Serialized Data Payloads attack work?
- It typically unfolds over 2 phases. It begins with: An adversary determines the input data stream that is being processed by an serialized data parser on the victim's side.
- How do you prevent CAPEC-231?
- 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.
- What weaknesses does CAPEC-231 target?
- CAPEC-231 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-231?
- MITRE rates CAPEC-231 as High severity with medium likelihood of attack.
Sources
References
Attack-pattern data is sourced from the MITRE CAPEC catalog (v3.9). Weakness associations link to the corresponding CWE entries on RadicalNotion.AI.
Defend against CAPEC-231
Track the CVEs and weaknesses this technique exploits, with AI-written analysis and remediation steps.