# CVE-2026-142212: YamlDotNet through 18.1.0 Uncontrolled Recursion via Self-Aliasing Mapping Key

Source: https://aplosec.si/cve/CVE-2026-142212/

[AploSec](https://aplosec.si/) / [Disclosures](https://aplosec.si/disclosures/) / CVE-2026-142212

High 8.7 · Reported · No fix listed · CWE-674 · NuGet

# YamlDotNet through 18.1.0 Uncontrolled Recursion via Self-Aliasing Mapping Key

CVE-2026-142212 · published 2026-12-02

In plain words: this type of bug lets someone slow down or crash the service with crafted input (denial of service). No fixed release is listed yet.

## Summary

CVE-2026-142212 affects YamlDotNet (NuGet) <= 18.1.0: Uncontrolled Recursion via Self-Aliasing Mapping Key (CWE-674). No fixed release is listed. CVSS 4.0 base score 8.7 (High), assigned by VulnCheck. Published 2026-12-02 by VulnCheck. Credit: Zachariah Mithani (AploSec).

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.

## Evidence

Reported to the maintainer. The public advisory and references below describe the evidence and preconditions; reporting status alone does not establish independent reproduction.

## Remediation

No fixed release is listed in the advisory. Check the references for upstream status.

## References

- [VulnCheck advisoryhttps://www.vulncheck.com/advisories/yamldotnet-through-18.1.0-uncontrolled-recursion-via-self-aliasing-mapping-key](https://www.vulncheck.com/advisories/yamldotnet-through-18.1.0-uncontrolled-recursion-via-self-aliasing-mapping-key)

- [Vulnerable codehttps://github.com/YamlDotNet/YamlDotNet/blob/v18.1.0/YamlDotNet/RepresentationModel/YamlNode.cs#L65-L101](https://github.com/YamlDotNet/YamlDotNet/blob/v18.1.0/YamlDotNet/RepresentationModel/YamlNode.cs#L65-L101)

- [Vulnerable codehttps://github.com/YamlDotNet/YamlDotNet/blob/v18.1.0/YamlDotNet/RepresentationModel/YamlSequenceNode.cs#L203-L212](https://github.com/YamlDotNet/YamlDotNet/blob/v18.1.0/YamlDotNet/RepresentationModel/YamlSequenceNode.cs#L203-L212)

- [Vulnerable codehttps://github.com/YamlDotNet/YamlDotNet/blob/v18.1.0/YamlDotNet/RepresentationModel/YamlMappingNode.cs#L76-L82](https://github.com/YamlDotNet/YamlDotNet/blob/v18.1.0/YamlDotNet/RepresentationModel/YamlMappingNode.cs#L76-L82)

- [CVE recordhttps://www.cve.org/CVERecord?id=CVE-2026-142212](https://www.cve.org/CVERecord?id=CVE-2026-142212)

**Severity:** High 8.7 CVSS 4.0, scored by VulnCheck in the [CVE record](https://www.cve.org/CVERecord?id=CVE-2026-142212)

**Package:** YamlDotNet

**Ecosystem:** NuGet

**Affected:** <= 18.1.0

**Fixed:** None

**Weakness:** CWE-674

**CNA:** VulnCheck

**Credit:** Zachariah Mithani (AploSec) finder
