ts-asn1-der has Incorrect DER Encoding of Numbers Leading to Denial of Service and Incorrect Value Representation
Incorrect number DER encoding can lead to denial on service for absolute values in the range 231 – 232 - 1. The arithmetic in the numBitLen didn't take into account that values in this range could result in a negative result upon applying the >> operator, leading to an infinite loop. In addition, number encoding had a few other issues that resulted it in it not encoding values correctly.