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. –CVE-2026-86531

    The embedded OpenEJB HTTP server does not limit the size of incoming request bodies or of multipart requests, and does not remove the temporary files it creates for multipart parts. A remote unauthenticated attacker can cause excessive mem…

  2. 7.0CVE-2026-114359

    Eclipse Kura downloads deployment packages (DPs) from a remote URL without any limit on the size of the data it receives. A malicious or compromised HTTP(S) server, or an attacker able to tamper with a plain-HTTP download, can stream an ar…

  3. 8.7CVE-2026-60040

    An unauthenticated remote attacker can perform a DoS in the backends backup creation function. This can result in a total loss of availability.

  4. 8.7CVE-2026-123817

    AIOHTTP is an asynchronous HTTP client/server framework for asyncio and Python. Prior to 3.14.4, the WebSocket reader retains one bytes object for each transport read while reassembling an incomplete frame. A malicious peer can split a fra…

  5. 6.8CVE-2026-125205

    FFmpeg through 9.0.2 contains an unbounded memory allocation vulnerability in the av1_frame_merge bitstream filter that allows attackers to exhaust memory by never sending a temporal delimiter OBU. Attackers can supply a crafted .obu file …

  6. 5.7CVE-2026-125186

    FFmpeg through 9.0.2 contains an uncontrolled resource consumption vulnerability in the dts2pts bitstream filter that allows attackers to exhaust CPU through unbounded per-packet POC node allocation. Attackers can supply a crafted H.264 pa…

  7. 6.8CVE-2026-125180

    FFmpeg 8.1 through 9.0.2 contains a memory exhaustion vulnerability in the libavcodec/exif.c parser that allows attackers to amplify allocations by pointing many IFD entries at overlapping payloads. Attackers can embed a small crafted EXIF…

  8. 7.5CVE-2026-112322

    clean_client() in lib/rpc/svc_auth_gssapi.c in MIT Kerberos 5 (aka krb5) restarts its scan from the head of the client list after each removal, resulting in quadratic CPU cost. Remote attackers can cause a denial of service (CPU consumptio…

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.