XML::Parser versions through 2.47 for Perl has an off-by-one heap buffer overflow in st_serial_stack. In the case (stackptr == stacksize - 1), the stack will NOT be expanded. Then the new value will be written at location (++stackptr), which equals stacksize and therefore falls just outside the allocated buffer. The bug can be observed when parsing an XML file with very deep element nesting
2.41-32.44-12.44-1build12.44-2build32.44-42.44-4build12.46-12.46-22.46-2build12.46-32.46-3build12.46-42.47-12.47-1build12.47-1build22.47-1build32.47-1build4Exploitability
AV:NAC:LPR:NUI:NScope
S:UImpact
C:HI:HA:HCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H