|Name ||XML Oversized Payloads |
|Summary ||Applications often need to transform data in and out of the XML format by using an XML parser. It may be possible for an attacker to inject data that may have an adverse effect on the XML parser when it is being processed. By supplying oversized payloads in input vectors that will be processed by the XML parser, an attacker can cause the XML parser to consume more resources while processing, causing excessive memory consumption and CPU utilization, and potentially cause execution of arbitrary code. An attacker's goal is to leverage parser failure to his or her advantage. In many cases this type of an attack will result in a denial of service due to an application becoming unstable, freezing, or crash. 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 [R.231.1]. |
|Prerequisites ||An application uses an XML parser to perform transformation on user-controllable data.
An application does not perform sufficient validation to ensure that user-controllable data is safe for an XML parser. |
|Solutions ||Carefully validate and sanitize all user-controllable data prior to passing it to the XML parser routine. Ensure that the resultant data is safe to pass to the XML parser.
Perform validation on canonical data.
Pick a robust implementation of an XML parser.
Validate XML against a valid schema or DTD prior to parsing. |
|CWE ID ||Description |
|CWE-19 ||Data Processing Errors |
|CWE-20 ||Improper Input Validation |
|CWE-112 ||Missing XML Validation |
|CWE-674 ||Uncontrolled Recursion |
|CWE-770 ||Allocation of Resources Without Limits or Throttling |