AZL-116114: CVE-2026-119443 affecting package erlang 26.2.5.21-8
Improper Restriction of XML External Entity Reference vulnerability in xmerlscan 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, xmerlscan:string/1,2 and xmerlscan:file/1,2 fetch and parse the external DTD named in a <!DOCTYPE root SYSTEM "..."> declaration. fetchDTD/2 in lib/xmerl/src/xmerlscan.erl passes every system identifier to the default fetch function, which maps file: and absolute URIs to local paths, and intfiledecl/3 then reads the whole file with file:readfile/1. This happens whether or not validation is enabled, and the allowentities 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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
erlangto a version that resolves this vulnerability.Fixed in 27.3.4.20 - Upgrade
Upgrade
erlangto a version that resolves this vulnerability.Fixed in 28.5.0.9 - Upgrade
Upgrade
erlangto a version that resolves this vulnerability.Fixed in 29.1.3
Event History
Frequently Asked Questions
What attacker access is required to trigger the memory exhaustion?
An attacker needs to cause the application to parse an XML document using xmerl_scan:string/1,2 or xmerl_scan:file/1,2. The document can specify an external DTD through a <!DOCTYPE root SYSTEM "..."> declaration, such as file:///dev/zero.
Are default xmerl_scan settings affected?
Yes. The affected xmerl_scan functions fetch and parse external DTDs with default options, regardless of whether validation is enabled. The allow_entities option does not prevent the DTD fetch, even though it is false by default since OTP 27.
What versions contain the fix?
The issue affects OTP 17.0 through versions before OTP 27.3.4.20, OTP 28.5.0.9, and OTP 29.1.3. The corresponding fixed xmerl versions are 2.1.3.4, 2.1.9.1, and 2.2.1; impact on OTP releases before 17.0 is unknown.
What is the operational impact of successful exploitation?
When the parser reads an unbounded source such as /dev/zero as an external DTD, the Erlang VM consumes memory until the operating system terminates it for lack of memory. The XML parse does not return.