Skip to main content
Vulnerability Database/CVE-2026-107390

CVE-2026-107390: Borewit Music-metadata DOS Vulnerability

CVE-2026-107390 is a denial of service flaw in Borewit Music-metadata that allows attackers to crash applications by submitting malicious MP4 files with oversized atom sizes. This post explains its impact, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-107390 Overview

CVE-2026-107390 is a denial of service vulnerability in music-metadata, a widely used JavaScript metadata parser for audio and video media files. The MP4 parser accepts an attacker-controlled 64-bit extended atom size and converts it to a JavaScript Number without validating that the atom fits within its parent container or the available input. A small, specially crafted MP4-family file can route an oversized length value into payload parsing for atoms including mvhd, stsd, stsz, and date. The result is a large allocation attempt or process failure before end-of-input validation occurs. The flaw is tracked as [CWE-789: Memory Allocation with Excessive Size Value] and is fixed in version 11.16.0.

Critical Impact

Any application that parses untrusted MP4-family media using a vulnerable music-metadata version can be denied service by a tiny crafted file.

Affected Products

  • borewit/music-metadata versions prior to 11.16.0
  • Node.js applications and services that process untrusted audio/video uploads
  • Downstream libraries and frameworks that depend on music-metadata for MP4, M4A, or MOV parsing

Discovery Timeline

  • 2026-10-08 - CVE-2026-107390 published to NVD
  • 2026-10-14 - Last updated in NVD database

Technical Details for CVE-2026-107390

Vulnerability Analysis

The MP4 container format uses atoms (also called boxes) as its structural unit. Each atom declares its size in a header. When the standard 32-bit size field equals 1, the format allows an extended 64-bit size field to follow. The music-metadata MP4 parser read this 64-bit extended size, cast it to a JavaScript Number, and passed it directly to readToken calls for atom-specific payload parsing.

No bounds check confirmed that the declared size fit within the parent atom or the remaining tokenizer input. For atoms such as mvhd, stsd, stsz, and date, the parser attempts to allocate or read a buffer sized according to the attacker-controlled value. A single malformed header in a file of only a few hundred bytes can trigger an allocation attempt in the gigabyte range or an unhandled read past end-of-input, crashing the Node.js process.

Root Cause

The root cause is missing size validation prior to buffer allocation, consistent with [CWE-789]. The parser trusted the atom header's declared length as authoritative input rather than treating it as untrusted data requiring validation against the surrounding structure.

Attack Vector

Exploitation requires only that a vulnerable application parse an attacker-supplied MP4-family file. The attack is network-reachable in any workflow that accepts user-uploaded media: web upload endpoints, media processing pipelines, podcast ingestion services, and messaging platforms. No authentication or user interaction beyond file submission is required.

typescript
// Patch excerpt from lib/mp4/Atom.ts
// Source: https://github.com/Borewit/music-metadata/commit/0f19ad66d71889b1c5f3ba84d4824f079ac4c005
 import initDebug from 'debug';
 import type { ITokenizer } from 'strtok3';
 import * as AtomToken from './AtomToken.js';
-import { Header } from './AtomToken.js';
+import { Header, Mp4ContentError } from './AtomToken.js';

 export type AtomDataHandler = (atom: Atom, remaining: number) => Promise<void>;

The fix introduces an Mp4ContentError type and adds size validation so malformed atoms raise a structured parse error instead of triggering an oversized allocation. Source: GitHub Commit 0f19ad6.

Detection Methods for CVE-2026-107390

Indicators of Compromise

  • Node.js process crashes or RangeError: Invalid typed array length exceptions originating from music-metadata call stacks
  • Sudden memory spikes in media processing workers followed by out-of-memory termination
  • MP4, M4A, or MOV uploads with abnormally small file sizes that reference mvhd, stsd, stsz, or date atoms declaring 64-bit extended sizes

Detection Strategies

  • Inventory application dependencies and flag any direct or transitive use of music-metadata at versions below 11.16.0 using npm ls music-metadata or Software Composition Analysis tooling
  • Inspect upload pipelines for MP4-family files where the first atom header uses the 32-bit size value 1 combined with a 64-bit extended size that exceeds the actual file length
  • Correlate web upload events with downstream worker crashes to identify repeated parse-failure patterns tied to a specific client or source

Monitoring Recommendations

  • Enable per-request resource limits and crash telemetry on services that run music-metadata so repeated denial of service attempts become visible
  • Track application restart frequency and heap exhaustion events in media parsing microservices
  • Add alerting on anomalous rejection rates from file upload endpoints that accept audio or video content

How to Mitigate CVE-2026-107390

Immediate Actions Required

  • Upgrade music-metadata to version 11.16.0 or later in all applications and container images
  • Audit transitive dependencies with npm audit or yarn audit and rebuild lockfiles after upgrading
  • Restart long-running Node.js services after the upgrade to ensure the patched module is loaded

Patch Information

The fix is available in music-metadata version 11.16.0. See the GitHub Release v11.16.0, the merged GitHub Pull Request #2746, and the GitHub Security Advisory GHSA-qc8q-pw95-mq6c for full technical details.

Workarounds

  • Reject uploads that exceed expected media size bounds and validate MIME type and container structure before invoking the parser
  • Run parsing in an isolated worker process or child process with strict memory limits so a crash does not take down the main service
  • Restrict upload endpoints to authenticated users and apply rate limiting to reduce the exposure window until patching is complete
bash
# Upgrade music-metadata to the patched release
npm install music-metadata@^11.16.0

# Verify the installed version
npm ls music-metadata

# Audit for remaining vulnerable transitive dependencies
npm audit --production

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.