CVE-2026-142212: YamlDotNet through 18.1.0 Uncontrolled Recursion via Self-Aliasing Mapping Key
YamlDotNet through 18.1.0 contains an uncontrolled recursion vulnerability in YamlSequenceNode and YamlMappingNode GetHashCode that allows unauthenticated remote attackers to crash applications using YamlStream.Load. Attackers can supply a tiny YAML document with a self-aliasing anchored sequence used as a mapping key, triggering an uncatchable StackOverflowException that terminates the hosting process.
Affected Software
Event History
Frequently Asked Questions
Which applications are exposed to this denial-of-service issue?
Applications using YamlDotNet through version 18.1.0 are exposed when they call YamlStream.Load on YAML that an attacker can supply. The affected code paths are YamlSequenceNode and YamlMappingNode GetHashCode handling a self-aliasing anchored sequence used as a mapping key.
What does an attacker need to exploit it?
The attacker needs only network access to a path that accepts attacker-controlled YAML and passes it to YamlStream.Load. No authentication or user interaction is required, and the malicious document can be very small.
What is the operational impact of successful exploitation?
Processing the crafted YAML triggers an uncatchable StackOverflowException. This terminates the hosting process, causing denial of service.