CVE-2026-140436: yaml_elixir: exponential alias expansion in YamlElixir.Mapper allows memory exhaustion

Published Dec 4, 2026
·
Updated

Improper Restriction of Recursive Entity References vulnerability in YamlElixir.Mapper in KamilLelonek yamlelixir 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/yamlelixir/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 yamlelixir: from 0.0.1 before 2.13.0.

Affected Software

1 affected component
hex/yaml_elixir>=0.0.1<2.13.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade yaml_elixir to a version that resolves this vulnerability.

    Fixed in 2.13.0

Event History

Dec 4, 2026
CVE Published
via MITRE·06:31 AM
Data Sourced
via MITRE·06:31 AM
DescriptionWeakness

Frequently Asked Questions

1

Who is exposed to this issue?

Applications using yaml_elixir versions from 0.0.1 up to, but not including, 2.13.0 are affected when they parse YAML through any YamlElixir.read_* function with default options. Exposure is most relevant where an attacker can supply or influence the YAML being parsed.

2

What does an attacker need to exploit it?

The attacker needs to cause the application to parse a crafted YAML document containing nested anchors and aliases. The mapper expands aliases by copying anchored nodes, causing memory consumption to grow exponentially with nesting depth and potentially exhausting the BEAM node's memory.

3

Are default settings affected?

Yes. All YamlElixir.read_* functions are affected with their default options.

4

How can I determine whether my application is affected?

Check whether the application depends on yaml_elixir and whether the resolved version is earlier than 2.13.0. Then identify uses of YamlElixir.read_* that may parse YAML supplied or influenced by untrusted parties.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203