CAPEC Definitions

    CAPEC Definitions / CAPEC-491

    CAPEC-491: Quadratic Data Expansion

    An adversary exploits macro-like substitution to cause a denial of service situation due to excessive memory being allocated to fully expand the data. The result of this denial of service could cause the application to freeze or crash. This involves defining a very large entity and using it multiple times in a single entity substitution. CAPEC-197 is a similar attack pattern, but it is easier to discover and defend against. This attack pattern does not perform multi-level substitution and therefore does not obviously appear to consume extensive resources.

    Severity:
    Possibility:

    Extended Description

    No Extended Description.

    Mitigations

    Design: Use libraries and templates that minimize unfiltered input. Use methods that limit entity expansion and throw exceptions on attempted entity expansion.

    Implementation: For XML based data - disable altogether the use of inline DTD schemas when parsing XML objects. If a DTD must be used, normalize, filter and use an allowlist and parse with methods and routines that will detect entity expansion from untrusted sources.

    Relationships with other CAPECs

    CAPEC-230: Serialized Data with Nested Payloads

    Prerequisites

    This type of attack requires a server that accepts serialization data which supports substitution and parses the data.

    Related Weaknesses

    CWE-770: Allocation of Resources Without Limits or Throttling