CVE-2026-140436 PUBLISHED

yaml_elixir: exponential alias expansion in YamlElixir.Mapper allows memory exhaustion

Assigner: EEF
Reserved: 02.12.2026 Published: 04.12.2026 Updated: 04.12.2026

Improper Restriction of Recursive Entity References vulnerability in YamlElixir.Mapper in KamilLelonek yaml_elixir allows an attacker to exhaust the memory of the BEAM node via a YAML document with nested anchors and aliases.

yamerl resolves each alias to the term of its anchor, so the parsed document stays as small as the input. YamlElixir.Mapper.process/2 in lib/yaml_elixir/mapper.ex walks that document as a tree and builds a new copy of the anchored node for every alias. With nested anchors, the size of the result grows exponentially with the nesting depth. All YamlElixir.read_* functions are affected with their default options.

This issue affects yaml_elixir: from 0.0.1 before 2.13.0.

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 KamilLelonek
Product yaml_elixir
Versions Default: unaffected
  • affected from 0.0.1 to 2.13.0 (excl.)
Vendor KamilLelonek
Product yaml_elixir
Versions Default: unaffected
  • affected from dd8e152738f2396c16bf537267fe0f4ce66cada4 to add27450860201caf63ea445a1e6f00ce8267250 (excl.)

Workarounds

Parse untrusted YAML in a separate process that has a max_heap_size limit with kill: true, set with Process.flag/2. The runtime then stops only that process when the conversion exceeds the limit.

Credits

  • Marc Nickert / intcube GmbH finder
  • Marc Nickert / intcube GmbH reporter
  • Jonatan Männchen / EEF coordinator
  • Marc Nickert / intcube GmbH coordinator
  • Kamil Lelonek remediation developer

References

Problem Types

  • CWE-776 Improper Restriction of Recursive Entity References in DTDs CWE

Impacts

  • An attacker who can make an application parse a YAML document of their choice can exhaust the memory of the parsing process. A BEAM process has no heap limit by default, so the node can run out of memory and stop, which ends every application on it.