The vulnerability is an infinite loop in the ASF parser of the music-metadata library, identified as CVE-2026-32256. The root cause is the improper handling of object sizes within the AsfParser.parseObjectHeader function in lib/asf/AsfParser.ts. When parsing a crafted ASF file containing an object with a size of 0, the code calculates a negative remaining size. This negative value leads to incorrect pointer arithmetic, causing the parser to get stuck in an infinite loop, rereading the same data. This results in a denial of service.
The patch addresses this by adding a crucial validation step. It checks if the calculated remaining size is negative and, if so, throws an error, preventing the infinite loop. The analysis of the commit 318e963e21734bc03b4c7811facb23f900f9a378 confirms this change.
The primary vulnerable function is AsfParser.parseObjectHeader. However, the publicly exposed and affected methods are parseFile and parseBuffer, which are the entry points for this vulnerability. Any application using these functions to parse untrusted ASF files is at risk.