CVE-2026-119443 PUBLISHED

XML Scan Untrusted DTD Which May Result in out of Memory Crash

Assigner: EEF
Reserved: 30.10.2026 Published: 24.11.2026 Updated: 24.11.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.

Metrics

CVSS Vector: CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
CVSS Score: 6.9

Product Status

Vendor Erlang
Product OTP
Versions Default: unknown
  • affected from 1.3.7 to * (excl.)
Vendor Erlang
Product OTP
Versions Default: unknown
  • affected from 17.0 to * (excl.)
Vendor Erlang
Product OTP
Versions Default: unknown
  • affected from 84adefa331c4159d432d22840663c38f155cd4c1 to * (excl.)
  • unaffected from 4d5dc15b3ba923ad9d939c560749239289ba41f3 to * (excl.)
  • unaffected from 6723ad37c5ea8febb59b05e95f8d1343f2c2fb7d to * (excl.)

Workarounds

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.

Credits

  • Neil Berkman / Xuku LLC finder
  • Neil Berkman / Xuku LLC reporter
  • Ingela Andin coordinator
  • Jonatan Männchen / EEF coordinator
  • Lars Thorsén remediation developer

References

Problem Types

  • CWE-611 Improper Restriction of XML External Entity Reference CWE

Impacts

  • An attacker who can supply an XML document to an application that parses it with xmerl_scan using default options makes the node read an unbounded local resource such as /dev/zero. The read exhausts memory and takes the node down for every user of the application.