---
title: "CWE-611: Improper Restriction of XML External Entity Reference"
url: https://radicalnotion.ai/cwe/cwe-611
type: cwe
description: "The product processes an XML document that can contain XML entities with URIs that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-611: Improper Restriction of XML External Entity Reference

- **Abstraction:** Base
- **Structure:** Simple
- **Status:** Draft
- **CVEs with this as primary weakness:** 1,405
- **Of those, in CISA KEV:** 9
- **New in 2026:** 215
- **CWE catalog version:** 4.21

## Description

The product processes an XML document that can contain XML entities with URIs that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output.

## Background

XML documents optionally contain a Document Type Definition (DTD), which, among other features, enables the definition of XML entities. It is possible to define an entity by providing a substitution string in the form of a URI. The XML parser can access the contents of this URI and embed these contents back into the XML document for further processing.

## Alternate terms

- **XXE:** An acronym used for the term "XML eXternal Entities"

## Modes of introduction

| Phase | Note |
| --- | --- |
| Implementation | REALIZATION: This weakness is caused during implementation of an architectural security tactic. |

## Applicable platforms

**Languages:** XML (Undetermined)

**Technologies:** Web Based (Undetermined)

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Confidentiality | Read Application Data, Read Files or Directories | If the attacker is able to include a crafted DTD and a default entity resolver is enabled, the attacker may be able to access arbitrary files on the system. By submitting an XML file that defines an external entity with a file:// URI, an attacker can cause the processing application to read the contents of a local file. For example, a URI such as "file:///c:/winnt/win.ini" designates (in Windows) the file C:\\Winnt\\win.ini, or file:///etc/passwd designates the password file in Unix-based systems. Once the content of the URI is read, it is fed back into the application that is processing the XML. This application may echo back the data (e.g., in an error message), thereby exposing the file contents. |
| Integrity | Bypass Protection Mechanism | An attacker may supply a crafted DTD using URIs with schemes such as http://, forcing the application to make outgoing HTTP requests to servers that the attacker cannot reach directly, which can be used to bypass firewall restrictions; hide the source of attacks such as port scanning; or otherwise leverage the server's trust relationship with other entities. |
| Availability | DoS: Resource Consumption (CPU), DoS: Resource Consumption (Memory) | The product could consume excessive CPU cycles or memory using a URI that points to a large file, or a device that always returns data such as /dev/random. Alternately, the URI could reference a file that contains many nested or recursive entity references to further slow down parsing. |

## Potential mitigations

### Implementation, System Configuration

Many XML parsers and validators can be configured to disable external entity expansion.

## Detection methods

### Automated Static Analysis

Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

Effectiveness: High

## Observed examples

| CVE | Description |
| --- | --- |
| CVE-2022-42745 | Recruiter software allows reading arbitrary files using XXE |
| CVE-2005-1306 | A browser control can allow remote attackers to determine the existence of files via Javascript containing XML script. |
| CVE-2012-5656 | XXE during SVG image conversion |
| CVE-2012-2239 | XXE in PHP application allows reading the application's configuration file. |
| CVE-2012-3489 | XXE in database server |
| CVE-2012-4399 | XXE in rapid web application development framework allows reading arbitrary files. |
| CVE-2012-3363 | XXE via XML-RPC request. |
| CVE-2012-0037 | XXE in office document product using RDF. |
| CVE-2011-4107 | XXE in web-based administration tool for database. |
| CVE-2010-3322 | XXE in product that performs large-scale data analysis. |
| CVE-2009-1699 | XXE in XSL stylesheet functionality in a common library used by some web browsers. |

## Real CVEs with this weakness (sample of 12 of 1,405)

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2025-2775 | SysAid On-Prem \<= 23.3.40 Checkin Proceessing XML External Entity Injection | critical | 9.3 | - | Yes | 2025-05-07 |
| CVE-2024-34102 | XXE can expose crypt key and other secrets granting full admin access | critical | 9.3 | - | Yes | 2024-06-13 |
| CVE-2019-9670 | Synacor Zimbra Collaboration Suite (ZCS) Improper Restriction of XML External Entity Reference | critical | 9.3 | - | Yes | 2019-05-29 |
| CVE-2025-58360 | GeoServer is vulnerable to an Unauthenticated XML External Entities (XXE) attack via WMS GetMap feature | high | 8.8 | - | Yes | 2025-11-25 |
| CVE-2023-45727 | North Grid Proself Improper Restriction of XML External Entity (XXE) Reference Vulnerability | high | 8.7 | - | Yes | 2023-10-18 |
| CVE-2019-13608 | Citrix StoreFront Server XML External Entity (XXE) Processing Vulnerability | high | 8.7 | - | Yes | 2019-08-29 |
| CVE-2025-2776 | SysAid On-Prem \<= 23.3.40 serverurl Proceessing XML External Entity Injection | high | 7.7 | - | Yes | 2025-05-07 |
| CVE-2026-20320 | Cisco BroadWorks Out-of-Band Blind XML External Entity Injection Vulnerability | high | 7.5 | - | Yes | 2026-08-19 |
| CVE-2016-9563 | SAP NetWeaver XML External Entity (XXE) Vulnerability | high | 7.1 | - | Yes | 2016-11-23 |
| CVE-2025-66516 | Apache Tika core, Apache Tika parsers, Apache Tika PDF parser module: Update to CVE-2025-54988 to expand scope of artifacts affected | critical | 10.0 | - | No | 2025-12-04 |
| CVE-2023-38693 | RCE in Lucee REST endpoint | critical | 10.0 | - | No | 2025-03-05 |
| CVE-2023-38490 | Kirby XML External Entity (XXE) vulnerability in the XML data handler | critical | 10.0 | - | No | 2023-07-27 |

## Related attack patterns (CAPEC)

- [CAPEC-221](https://radicalnotion.ai/capec/capec-221): Data Serialization External Entities Blowup

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-610](https://radicalnotion.ai/cwe/cwe-610) | Externally Controlled Reference to a Resource in Another Sphere |
| Peer | [CWE-441](https://radicalnotion.ai/cwe/cwe-441) | Unintended Proxy or Intermediary |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| WASC | XML External Entities | 43 | - |
| Software Fault Patterns | Tainted input to command | SFP24 | - |

## Frequently asked questions

### What is CWE-611?

The product processes an XML document that can contain XML entities with URIs that resolve to documents outside of the intended sphere of control, causing the product to embed incorrect documents into its output.

### What CVEs are caused by CWE-611?

1,405 recorded CVEs are attributed to CWE-611, including CVE-2025-2775, CVE-2024-34102 and CVE-2019-9670. 9 are listed in CISA's Known Exploited Vulnerabilities (KEV) catalog.

### How do you prevent CWE-611?

Many XML parsers and validators can be configured to disable external entity expansion.

### How is CWE-611 detected?

Automated Static Analysis: Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

### What are the consequences of CWE-611?

Exploiting CWE-611 can lead to: Read Application Data, Read Files or Directories, Bypass Protection Mechanism, DoS: Resource Consumption (CPU), DoS: Resource Consumption (Memory).

### Is CWE-611 actively exploited?

Yes. 9 CWE-611 vulnerabilities are in CISA's KEV catalog of actively exploited flaws, out of 1,405 recorded CVEs.

Primary source: [MITRE CWE](https://cwe.mitre.org/data/definitions/611.html)

---

Source: [RadicalNotion.AI](https://radicalnotion.ai/cwe/cwe-611). Licensed CC BY-NC 4.0; attribute RadicalNotion.AI and link the source page when you reuse this data.
