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.
No advisories yet.
Solution
No solution given by the vendor.
Workaround
Pass a fetch_fun that refuses external resources in the option list of xmerl_scan:string/2 or xmerl_scan:file/2, for example {fetch_fun, fun(_ExtSpec, State) -> {ok, not_fetched, State} end}. The scanner then continues without reading or parsing the external DTD.
Tue, 24 Nov 2026 15:15:00 +0000
| Type | Values Removed | Values Added |
|---|---|---|
| Description | 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. | |
| Title | XML Scan Untrusted DTD Which May Result in out of Memory Crash | |
| First Time appeared |
Erlang
Erlang erlang\/otp |
|
| Weaknesses | CWE-611 | |
| CPEs | cpe:2.3:a:erlang:erlang\/otp:*:*:*:*:*:*:*:* | |
| Vendors & Products |
Erlang
Erlang erlang\/otp |
|
| References |
|
|
| Metrics |
cvssV4_0
|
Projects
Sign in to view the affected projects.
Status: PUBLISHED
Assigner: EEF
Published:
Updated: 2026-11-24T15:02:12.313Z
Reserved: 2026-10-30T09:45:01.835Z
Link: CVE-2026-119443
No data.
Status : Awaiting Analysis
Published: 2026-11-24T15:17:14.180
Modified: 2026-11-24T19:12:16.707
Link: CVE-2026-119443
No data.
OpenCVE Enrichment
Updated: 2026-11-24T18:00:09Z