{"id":"GHSA-v6c2-xwv6-8xf7","summary":"music-metadata has an infinite loop vulnerability in ASF parser","details":"# Summary\n\nmusic-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`.\n\n## Root Cause\n\nWhen objectSize is 0:\n1. `remaining = 0 - 24 = -24`\n2. `tokenizer.ignore(-24)` moves the read position backward by 24 bytes\n3. `extensionSize -= 0` (loop counter never decreases)\n4. `while (extensionSize \u003e 0)` never exits\n5. The same 24-byte header is re-read infinitely\n\nThis is the same pattern as CVE-2026-31808 (GHSA-5v7r-6r5c-r473) in file-type — strtok3's `AbstractTokenizer.ignore()` accepts negative values without validation.\n\n## Affected Methods\n- `parseFile()` — HANGS (FileTokenizer inherits vulnerable ignore())\n- `parseBuffer()` — HANGS (BufferTokenizer inherits vulnerable ignore())\n- `parseStream()` — NOT affected (ReadStreamTokenizer has own ignore() that throws RangeError)\n\n## Impact\nA 100-byte crafted .asf file permanently hangs any application using parseFile() or parseBuffer(). music-metadata has 2.2M weekly npm downloads.\n\n## Suggested Fix\nValidate `objectSize \u003e= minimumHeaderSize` before calculating the payload. Or fix strtok3's `AbstractTokenizer.ignore()` to reject negative values.","aliases":["CVE-2026-32256"],"modified":"2026-03-19T21:16:28.989979Z","published":"2026-03-17T20:04:48Z","database_specific":{"github_reviewed_at":"2026-03-17T20:04:48Z","nvd_published_at":"2026-03-18T04:17:25Z","cwe_ids":["CWE-835"],"severity":"HIGH","github_reviewed":true},"references":[{"type":"WEB","url":"https://github.com/Borewit/music-metadata/security/advisories/GHSA-v6c2-xwv6-8xf7"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-32256"},{"type":"PACKAGE","url":"https://github.com/Borewit/music-metadata"},{"type":"WEB","url":"https://github.com/Borewit/music-metadata/releases/tag/v11.12.3"}],"affected":[{"package":{"name":"music-metadata","ecosystem":"npm","purl":"pkg:npm/music-metadata"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"11.12.3"}]}],"database_specific":{"last_known_affected_version_range":"\u003c= 11.12.1","source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/03/GHSA-v6c2-xwv6-8xf7/GHSA-v6c2-xwv6-8xf7.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"}]}