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.
https://security.netapp.com/advisory/ntap-20221228-0005/
https://lists.debian.org/debian-lts-announce/2020/03/msg00032.html