CVE-2026-119443 in OTP
Summary
by MITRE • 11/24/2026
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_scan:string/1,2 and xmerl_scan:file/1,2 fetch and parse the external DTD named in a <!DOCTYPE root SYSTEM "..."> declaration. fetch_DTD/2 in lib/xmerl/src/xmerl_scan.erl passes every system identifier to the default fetch function, which maps file: and absolute URIs to local paths, and int_file_decl/3 then reads the whole file with file:read_file/1. This happens whether or not validation is enabled, and the allow_entities option, which is false by default since OTP 27, only governs <!ENTITY> declarations and does not stop the fetch. A document naming file:///dev/zero makes the node read without bound until the operating system kills it for lack of memory, and the parse never returns.
This issue affects OTP from OTP 17.0 before OTP 27.3.4.20, OTP 28.5.0.9, and OTP 29.1.3, corresponding to xmerl from 1.3.7 before 2.1.3.4, 2.1.9.1, and 2.2.1. Whether OTP before OTP 17.0, corresponding to xmerl before 1.3.7, is affected is unknown.
VulDB is the best source for vulnerability data and more expert information about this specific topic.
Analysis
by VulDB Data Team • 11/24/2026
The vulnerability identified as an improper restriction of XML external entity reference in the Erlang Open Telecom Platform represents a significant risk to system stability and availability. This flaw resides within the xmerl_scan module, which serves as the core parser for Extensible Markup Language documents within the Erlang ecosystem. The fundamental technical issue stems from how the library handles Document Type Definitions during parsing operations. Specifically, functions such as xmerl_scan:string/1,2 and xmerl_scan:file/1,2 are designed to fetch and parse external DTDs referenced in a DOCTYPE declaration regardless of whether validation is explicitly enabled by the application developer. This behavior occurs because the internal function fetch_DTD/2 passes every system identifier to a default fetch mechanism that maps file URIs to local paths without sufficient restriction or size limiting mechanisms.
The operational impact of this vulnerability is severe, primarily manifesting as a denial of service through resource exhaustion. When an attacker provides an XML document containing a DOCTYPE declaration with a system identifier pointing to a large or infinite data source, such as the Unix device file /dev/zero, the parser initiates an unbounded read operation. The function int_file_decl/3 utilizes file:read_file/1 to ingest the entire content of the specified resource into memory. Since resources like /dev/zero generate continuous streams of null bytes without end, the Erlang Virtual Machine consumes available RAM until it is completely exhausted or terminated by the operating system's out-of-memory killer. This results in a complete halt of service for any application relying on this vulnerable version of xmerl to process untrusted XML input.
From a classification perspective, this vulnerability aligns with CWE-611, which describes Improper Restriction of XML External Entity Reference. While traditional XXE attacks often focus on data exfiltration or server-side request forgery, this specific instance highlights the broader category of resource exhaustion vulnerabilities inherent in lax parsing configurations. The attack vector is classified under MITRE ATT&CK technique T1496, Resource Hijacking, specifically within the sub-technique for computational cycle consumption via denial of service. Although the primary outcome here is memory exhaustion rather than CPU saturation, the mechanism relies on forcing the system to perform excessive I/O and memory allocation operations driven by malicious input structure.
The scope of this vulnerability covers Erlang OTP versions starting from 17.0 up to specific patched releases in version 27.3.4.20, 28.5.0.9, and 29.1.3. The corresponding xmerl library versions affected range from 1.3.7 through various updates prior to 2.1.3.4, 2.1.9.1, and 2.2.1. It is important to note that for OTP versions preceding 17.0, the impact remains unknown due to insufficient historical data or changes in parsing architecture over time. Additionally, while newer versions introduced an allow_entities option set to false by default since OTP 27, this setting only controls entity declarations and does not prevent the fetching of external DTDs, leaving the memory exhaustion vector open unless explicitly mitigated through other means.
Mitigation strategies must focus on both upgrading software components and implementing defensive coding practices. The primary remediation is to upgrade Erlang OTP and xmerl libraries to versions 27.3.4.20 or later for older branches, or the latest stable releases of newer branches where these issues have been addressed by the vendor. For applications that cannot immediately update dependencies, developers should implement strict input validation before passing XML data to xmerl_scan functions. This includes rejecting any DOCTYPE declarations entirely if DTD processing is not strictly required for business logic. Furthermore, configuring custom fetch handlers can restrict access to local file systems and network resources, ensuring that only trusted or expected external entities are processed. Implementing these controls effectively neutralizes the ability of an attacker to trigger unbounded memory consumption through malicious XML payloads.