CVE-2016-2338 (https://lists.debian.org/debian-lts-announce/2020/03/msg00032.html): An exploitable heap overflow vulnerability exists in the Psych::Emitter start_document function of Ruby. In Psych::Emitter start_document function heap buffer "head" allocation is made based on tags array length. Specially constructed object passed as element of tags array can increase this array size after mentioned allocation and cause heap overflow. So this is an issue made public all the way back in 2016, but of course no apparent upstream report. Was this ever fixed upstream?
Looks to be fixed in https://github.com/ruby/ruby/commit/cc0313436160b735a3d41361cb5e3eeb10fcbdad which should be in ruby 2.4 and later, and possible 2.3. The POC in the original bug report runs fine for me without crashes.
Thanks!