Get a Demo

Let's Patch It!

Book a short call with one our specialists, we'll walk you through how Endor Patches work, and ask you a few questions about your environment (like your primary programming languages and repository management). We'll also send you an email right after you fill out the form, feel free to reply with any questions you have in advance!

CVE

CVE-2026-32256

music-metadata has an infinite loop vulnerability in ASF parser
Back to all
CVE

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. 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.

Package Versions Affected

Package Version
patch Availability
No items found.

Automatically patch vulnerabilities without upgrading

Fix Without Upgrading
Detect compatible fix
Apply safe remediation
Fix with a single pull request

CVSS Version

Severity
Base Score
CVSS Version
Score Vector
C
H
U
7.5
-
3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
C
H
U
0
-
3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
C
H
U
7.5
-
3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Related Resources

No items found.

References

https://github.com/Borewit/music-metadata/security/advisories/GHSA-v6c2-xwv6-8xf7, https://nvd.nist.gov/vuln/detail/CVE-2026-32256, https://github.com/Borewit/music-metadata, https://github.com/Borewit/music-metadata/releases/tag/v11.12.3

Severity

7.5

CVSS Score
0
10

Basic Information

Ecosystem
Base CVSS
7.5
EPSS Probability
0.00021%
EPSS Percentile
0.06265%
Introduced Version
0,0.9.7,0.7.7,0.7.3,0.7.0
Fix Available
11.12.3,11.12.2

Fix Critical Vulnerabilities Instantly

Secure your app without upgrading.
Fix Without Upgrading