CVE-2026-140436
Received Received - Intake

Memory Exhaustion in YamlElixir.Mapper via Nested YAML Anchors

Vulnerability report for CVE-2026-140436, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-12-04

Last updated on: 2026-12-04

Assigner: EEF

Description

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-12-04
Last Modified
2026-12-04
Generated
2026-12-04
AI Q&A
2026-12-04
EPSS Evaluated
N/A
NVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
KamilLelonek yaml_elixir From 0.0.1 (inc) to 2.13.0 (exc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-776 The product uses XML documents and allows their structure to be defined with a Document Type Definition (DTD), but it does not properly control the number of recursive definitions of entities.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability is an Improper Restriction of Recursive Entity References issue in the YamlElixir.Mapper library. When parsing YAML documents with nested anchors and aliases, the mapper creates an exponentially growing number of node copies during processing. This leads to rapid memory exhaustion in the BEAM runtime, potentially crashing the entire node.

Detection Guidance

To detect this vulnerability, monitor for excessive memory usage during YAML parsing. Check for crashes in Elixir/Erlang applications handling YAML files. Use tools like `htop` or `ps` to observe memory consumption spikes when processing YAML documents with nested structures.

Impact Analysis

An attacker could exploit this by providing a small YAML file with deeply nested aliases, causing the application to consume excessive memory. This may lead to denial-of-service conditions, system crashes, or resource exhaustion on the server running the vulnerable library.

Mitigation Strategies

Upgrade yaml_elixir to version 2.13.0 or later to apply the node count limit fix. For untrusted YAML inputs, parse them in a separate process with a heap size limit. Use the `:max_nodes` option to restrict node expansion during parsing.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-140436. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart

Security Radar

News mentioning this vulnerability
Loading related security news...