Medium · 6.2 Node.js & npm GHSA-53v6-4h7p-p4gj CVE-2026-107387
music-metadata: Uncontrolled Memory Allocation in APEv2 Parser (CVE-2026-107387)
A vulnerability in the music-metadata npm package allows a specially crafted APE audio file to trigger excessive memory allocation, potentially exhausting process memory. The issue is fixed in version 11.16.0.
By PatchBriefing ·
Produced automatically from official sources with the help of AI. How we work →
AI summary
A memory-allocation vulnerability has been identified in music-metadata, an npm package used to parse metadata from audio and video files. The flaw affects the parser's handling of APEv2 tags and can be triggered with a specially crafted file, resulting in excessive memory consumption. A fixed version is available.
What happened
A vulnerability was identified in music-metadata, a JavaScript library used to parse metadata from audio and video files. The library's APEv2 parser reads a size value for a tag item from the file itself and allocates a buffer for that item before verifying that the declared size actually fits within the remaining tag or file data. A small, specially crafted APE file — including one abusing cover-art items — can cause the parser to attempt a disproportionately large memory allocation. Repeated or concurrent parsing of such files can exhaust available process memory.
Technical cause
The root cause is uncontrolled resource allocation (CWE-789): the parser trusts an attacker-controlled size field in an APEv2 tag item and allocates a Uint8Array sized according to that field without first validating it against the actual amount of data remaining in the tag or file. This allows a crafted file to request an allocation far larger than the file's real size.
Why it matters
The demonstrated impact is limited to availability: processing a malicious file can cause excessive memory use, potentially crashing or degrading the process that performs the parsing. The CVSS vector indicates local attack vector, low attack complexity, no privileges required, and no user interaction, with impact limited to availability (high) and no impact on confidentiality or integrity. There is no indication of data exposure or code execution.
Who is affected
Applications and services that use the music-metadata npm package to parse untrusted or user-supplied audio or video files are affected, particularly any system that processes APE files or embedded cover-art items from external sources.
Affected versions
All versions of music-metadata starting from version 0 up to, but not including, version 11.16.0 are affected.
Fixes and mitigation
This issue is fixed in music-metadata version 11.16.0, which adds validation to ensure a declared item size fits within the remaining tag or file data before allocation.
Recommended action
Update the music-metadata package to version 11.16.0 or later. If an immediate update is not possible, consider limiting or sandboxing the resources available to processes that parse untrusted audio/video files, and avoid parsing files from untrusted sources until updated.
PatchBriefing score
6.2 / 10 · Medium
Official CVSS: 6.2
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS 0.0020 (6 percentile)
Why this score
The PatchBriefing score equals the official CVSS score; when this article covers several vulnerabilities, the highest one. Signals such as known exploitation and EPSS are listed separately and do not change the score.
Affected versions
- music-metadata ≥ 0 < 11.16.0
- vulnerable
- ≥ 11.16.0
- patched
Reported fixes
This issue is fixed in music-metadata version 11.16.0, which adds validation to ensure a declared item size fits within the remaining tag or file data before allocation.
How this was built
3 source records were collected, matched and used to prepare the report above.
-
OSV.dev database
-
CVE.org database
-
NVD (NIST) database
Revision history
- Generated
- Published
- Generated