CVE-2026-32256: music-metadata has an infinite loop vulnerability in ASF parser
Summary music-metadata's ASF parser (parseExtensionObject() in lib/asf/AsfParser.ts:112-158) enters an infinite loop when a sub-object inside the ASF Header Extension Object has objectSize = 0. Root Cause When objectSize is 0: 1. remaining = 0 - 24 = -24 2. tokenizer.ignore(-24) moves the read position backward by 24 bytes 3. extensionSize -= 0 (loop counter never decreases) 4. while (extensionSize 0) never exits 5.
Published Mar 17, 2026 · Updated Mar 19, 2026
Affected packages
music-metadata
- Ecosystem
- npm
- Affected
- <= 11.12.1
- Fixed in
- 11.12.3
- Check
npm ls music-metadata
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
music-metadata's ASF parser (parseExtensionObject() in lib/asf/AsfParser.ts:112-158) enters an infinite loop when a sub-object inside the ASF Header Extension Object has objectSize = 0.
Root Cause
When objectSize is 0:
remaining = 0 - 24 = -24tokenizer.ignore(-24)moves the read position backward by 24 bytesextensionSize -= 0(loop counter never decreases)while (extensionSize > 0)never exits- The same 24-byte header is re-read infinitely
This is the same pattern as CVE-2026-31808 (GHSA-5v7r-6r5c-r473) in file-type — strtok3's AbstractTokenizer.ignore() accepts negative values without validation.
Affected Methods
parseFile()— HANGS (FileTokenizer inherits vulnerable ignore())parseBuffer()— HANGS (BufferTokenizer inherits vulnerable ignore())parseStream()— NOT affected (ReadStreamTokenizer has own ignore() that throws RangeError)
Impact
A 100-byte crafted .asf file permanently hangs any application using parseFile() or parseBuffer(). music-metadata has 2.2M weekly npm downloads.
Suggested Fix
Validate objectSize >= minimumHeaderSize before calculating the payload. Or fix strtok3's AbstractTokenizer.ignore() to reject negative values.
Credited to ByamB4.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More npm vulnerabilities
All npm entriesCVE-2026-107387
music-metadata: Uncontrolled memory allocation in APEv2 parser
medium6.2Oct 8, 2026CVE-2026-107388
music-metadata: ID3v2 tag size not validated before allocation, causing memory exhaustion DoS
medium6.2Oct 8, 2026CVE-2026-107389
music-metadata: EBML parser trusts element lengths, allowing memory exhaustion or process abort
medium6.2Oct 8, 2026CVE-2026-107391
music-metadata: MP4 stsd sample-entry size==0 causes a synchronous infinite loop (DoS) — unreleased regression on master
medium6.2Oct 8, 2026CVE-2026-107392
music-metadata: uncatchable process crash parsing a crafted `.dsf` (residual of GHSA-v6c2-xwv6-8xf7)
medium6.2Oct 8, 2026
