Convert::ASN1 versions before 0.37 for Perl contain a vulnerability that allows memory exhaustion. This occurs because the declared length of an ASN.1 element in its BER header is passed unchecked to sysread, causing Perl to allocate memory based on the declared length rather than the actual data size. A maliciously crafted 6-byte header can declare a length up to 4GB, leading to large memory allocation attempts. If the allocation fails, Perl exits with an "Out of memory" error that cannot be caught by eval.