cve.bz

CAPEC-491

Quadratic Data Expansion

Detailed pattern

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.

On this page

Ask an AI about this attack pattern

Show the promptExplain the attack pattern CAPEC-491: Quadratic Data Expansion: how it unfolds, what it needs and how to prevent and detect it in my systems. Use https://capec.mitre.org/data/definitions/491.html and https://cve.bz/cve/capec/491?via=ask-ai-copy, which lists recent CVEs with the weaknesses it exploits. Cite the sources.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this attack pattern's id and public links.

How the attack unfolds

  1. Explore

    The attacker looks for a way in.

    1. [Survey the target] An adversary determines the input data stream that is being processed by a data parser that supports using substituion on the victim's side.

      2 techniques
      • Use an automated tool to record all instances of URLs to process requests.
      • Use a browser to manually explore the website and analyze how the application processes requests.
  2. Exploit

    They carry out the attack.

    1. [Craft malicious payload] The adversary crafts malicious message containing nested quadratic expansion that completely uses up available server resource.

    2. [Send the message] Send the malicious crafted message to the target URL.

Prerequisites

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

Consequences

What a successful attack can lead to
ImpactAffectsNote
Unreliable Execution, Resource ConsumptionAvailabilityDenial of Service

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.

Weaknesses it exploits

  • CWE-770 Allocation of Resources Without Limits or Throttling

Recent CVEs with these weaknesses

  1. 5.3CVE-2026-34870

    Allocation of Resources Without Limits or Throttling in Hitachi Disk Array Systems. This issue affects Hitachi Virtual Storage Platform One Block 28: before DKC MAIN A3-05-21-40/00, ESM A3-05-21/00; Hitachi Virtual Storage Platform One Bl…

  2. 6.5CVE-2026-140063

    A flaw was found in glib2. An authenticated remote attacker can cause a Denial of Service (DoS) by sending a crafted D-Bus message header declaring a maximum message length before transmitting the message body. This causes the GDBus messag…

  3. 6.2CVE-2026-139844

    A flaw was found in glib2. A local attacker can cause a Denial of Service (DoS) by exhausting file descriptors in an application that communicates over UNIX domain sockets using GDBus. By repeatedly sending malformed or incomplete messages…

  4. 5.3CVE-2026-121473

    A flaw was found in sequoia-net. When retrieving certificates from an HTTP Keyserver Protocol (HKP) or Web Key Directory (WKD) server, incoming responses are buffered in memory without an enforced size limit. A malicious or compromised ser…

  5. 7.5CVE-2026-140015

    websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.9.1, a server piping socket bytes into websocket-driver continued adding data to an internal buffer after a WebSocket close frame caused the drive…

  6. 7.5CVE-2026-140009

    ws is an open source WebSocket client and server for Node.js. Prior to 5.2.8, 6.2.7, 7.5.14, and 8.23.0, a malicious WebSocket peer can send Ping frames while stopping reads, causing ws to generate and buffer automatic Pong responses witho…

  7. 7.5CVE-2026-140002

    websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.1, receiving a WebSocket close frame moves the driver into a state where the parser no longer consumes input, but a half-open TCP client can con…

  8. 7.5CVE-2026-140001

    websocket-driver is a WebSocket protocol handler with pluggable input and output. Prior to 0.8.1, the fragmented-message buffer stores every received frame payload, including zero-length Buffer objects, until a final fragment arrives. An u…

The newest records naming one of them. Each weakness's page lists them all.

Part of
  • CAPEC-230 Serialized Data with Nested Payloads

Examples

In this example the attacker defines one large entity and refers to it many times.

In this example the attacker defines one large entity and refers to it many times.

<?xml version="1.0"?>
<!DOCTYPE bomb [<!ENTITY x "AAAAA... [100K of them] ...AAAA">]>
<b><c>&x;&x;... [100K of them]...&x;&x;</c></b>

This results in a relatively small message of 100KBs that will expand to a message in the GB range.

MITRE's words, unchanged: CAPEC-491 at MITRE. CAPEC is Copyright © 2007–2026, The MITRE Corporation, used under the CAPEC terms of use: “The MITRE Corporation (MITRE) hereby grants you a non-exclusive, royalty-free license to use Common Attack Pattern Enumeration and Classification (CAPEC™) for research, development, and commercial purposes. Any copy you make for such purposes is authorized provided that you reproduce MITRE’s copyright designation and this license in any such copy.” CAPEC and the CAPEC logo are trademarks of The MITRE Corporation. Credits. All attack patterns.