CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-107391

CVE-2026-107391: Synchronous Infinite Loop and Memory Exhaustion in music-metadata MP4 Parser

Alon Barad
Alon Barad
Software Engineer

Oct 8, 2026·7 min read·15 visits

Executive Summary (TL;DR)

A regression in the MP4 stsd parser of music-metadata allows unauthenticated local or remote attackers to trigger a synchronous infinite loop and memory exhaustion via a crafted media file, blocking the Node.js event loop.

An input validation vulnerability exists in music-metadata versions prior to 11.16.0, where parsing a crafted MP4 file containing a sample-description (stsd) box with a zero-value size entry causes a synchronous infinite loop and memory exhaustion, resulting in complete Denial of Service.

Vulnerability Overview

The music-metadata package is a popular open-source audio and video metadata parser designed for Node.js and browser runtimes. It is widely incorporated into file-processing pipelines, content management systems, and media upload interfaces. Because it handles arbitrary binary streams from untrusted users, its parsing logic represents a critical surface area for security threats.

During development iterations on the master branch prior to release 11.16.0, a regression was introduced in the parser for MP4 stsd (sample description) boxes. The parsing logic is synchronous, which presents specific risks within the Node.js execution environment.

When music-metadata parses a maliciously structured MP4 file containing an entry with a declared size of zero, the internal file offset pointer fails to advance. The parsing loop continues indefinitely because its termination condition depends on an attacker-controlled entry counter. This infinite loop blocks the single-threaded Node.js event loop, preventing all concurrent execution and resulting in a denial of service.

Root Cause Analysis

The root cause of this vulnerability lies in lib/mp4/AtomToken.ts within the StsdAtom.get() method. A regression was introduced during modifications designed to align the offset progress calculation with the size fields of individual sample description entries. To compensate for the 4 bytes read during the size field extraction, the offset progress logic was updated from off += size to off += size - 4.

Under normal execution, the variable size represents the size of the current sample entry table, which must be at least 16 bytes. However, the input validation fails to verify that size is greater than or equal to the minimum required structure length before performing arithmetic on the pointer.

If the size field of an entry is explicitly set to 0 inside an attacker-controlled MP4 file, the math evaluates as follows:

  1. The offset pointer off is incremented by 4 bytes (Token.UINT32_BE.len) to account for reading the size field.
  2. The offset is updated by adding size - 4. Since size is 0, the program calculates 0 - 4 = -4.
  3. The net change to the offset pointer for that loop iteration is 4 + (-4) = 0.

Consequently, the pointer remains fixed on the exact same buffer location. In the next iteration of the loop, the parser reads the same zero value, calculates the same net zero progress, and remains stuck. Since the loop termination is bound by the attacker-specified numberOfEntries counter (which can be defined up to 4294967295), the execution hangs indefinitely.

Code Analysis and Comparison

The vulnerability is demonstrated in the execution logic within StsdAtom.get(). The following block represents the vulnerable execution path:

// Vulnerable loop structure in lib/mp4/AtomToken.ts
for (let n = 0; n < header.numberOfEntries; ++n) {
  const size = Token.UINT32_BE.get(buf, off); // Reads 0 from attacker-controlled buffer
  off += Token.UINT32_BE.len;                 // off increments by 4
  
  // Inserts a new table instance based on the non-advanced offset
  table.push(new SampleDescriptionTable(size - Token.UINT32_BE.len).get(buf, off));
  
  off += size - Token.UINT32_BE.len;          // off evaluates to: off + (0 - 4), net change is 0
}

Because the net progress of the pointer is zero, the loop iterates endlessly, reading the exact same index. In each iteration, table.push(...) is evaluated. This continuously appends elements to the internal array, causing unbounded heap memory growth until the system runs out of memory (OOM).

The fix implemented in version 11.16.0 addresses this by applying strict boundary validations. The size of each entry is now validated against the minimum physical length of an MP4 SampleEntry (16 bytes) and checked to ensure it does not exceed the remaining buffer length:

// Patched logic in lib/mp4/AtomToken.ts
const end = Math.min(off + this.len, buf.length);
if (end - off < stsdHeader.len) {
  throw new Mp4ContentError('Truncated stsd header');
}
 
const header = stsdHeader.get(buf, off);
off += stsdHeader.len;
const table: ISampleDescription[] = [];
 
for (let n = 0; n < header.numberOfEntries; ++n) {
  if (end - off < Token.UINT32_BE.len) {
    throw new Mp4ContentError('Truncated stsd sample entry');
  }
  const size = Token.UINT32_BE.get(buf, off);
  
  // Enforce absolute minimum entry size boundary of 16 bytes
  if (size < 16 || size > end - off) {
    throw new Mp4ContentError(`Invalid stsd sample entry size: ${size}`);
  }
  off += Token.UINT32_BE.len;
  table.push(new SampleDescriptionTable(size - Token.UINT32_BE.len).get(buf, off));
  off += size - Token.UINT32_BE.len;
}

By ensuring that size is at least 16, the loop is guaranteed to advance off by at least 12 bytes on each pass, preventing any freeze and constraining the absolute maximum execution iterations by the physical file size.

Exploitation Methodology

Exploitation of this vulnerability requires delivering a malformed MP4-family file (such as .mp4, .m4a, or .3gp) to an application that processes the file with an unpatched version of music-metadata.

The attack vector is local or remote, depending on where the host application processes files. In a common application scenario, a user uploads a media file to an API endpoint which then reads the metadata on the backend server. The attacker generates a minimal valid MP4 container consisting of basic headers and a corrupted stsd atom.

The structure of the exploit payload relies on key structures:

  • An ftyp box to bypass primitive format detection filters.
  • An stsd box that contains a numberOfEntries property set to a high limit, such as 0xFFFFFFFF.
  • A subsequent sample entry whose size field is declared as 0x00000000.

When the system receives the payload, the main Node.js event loop executes the parsing logic synchronously. Because Node.js is single-threaded, the entire process freezes. No concurrent network requests can be processed, and no microtasks or timers can execute. This blocks all application functionality for users sharing that process.

Impact Assessment

The overall security impact of this vulnerability is high, and it is classified as a severe Endpoint Denial of Service (T1499). While the attack does not allow privilege escalation or direct data leakage, its operational impact on Node.js-based services is complete.

Because of the single-threaded nature of Node.js, a synchronous infinite loop halts all event loop operations. Any other active requests are left unanswered, and the application becomes unresponsive. This allows a single unauthenticated HTTP request containing a small, 48-byte malicious file to completely disable a server instance.

Additionally, because each loop iteration instantiates and pushes a new SampleDescriptionTable object onto the local table array, the system dynamically consumes heap space. This results in rapid memory consumption, culminating in an Out Of Memory (OOM) error that terminates the Node.js process entirely, requiring a system restart.

Remediation and Mitigation

The primary recommendation is to update the music-metadata dependency to version 11.16.0 or higher, which integrates the correct boundary checks.

For environments where immediate upgrading is not possible, the following defensive practices should be adopted:

  1. Isolate Processing Pipelines: Run file metadata parsing tasks inside isolated Worker Threads (worker_threads module) or within sandbox subprocesses. This ensures that if a thread encounters an infinite loop or crashes from memory exhaustion, the main application remains responsive.

  2. Configure Process-Level Hard Limits: Employ process supervisors like PM2 or systemd to monitor CPU usage thresholds and memory footprints. Configure these managers to automatically recycle workers that exceed maximum expected runtimes or memory limits.

  3. Request Timeouts: Ensure that reverse proxies, load balancers, and gateway servers enforce strict timeouts on upload processing endpoints to prevent resources from being held indefinitely by locked processes.

Official Patches

BorewitCommit implementing input boundary validation within the MP4 sample description parser.

Technical Appendix

CVSS Score
6.2/ 10
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected Systems

Applications utilizing music-metadata versions < 11.16.0Node.js server-side media upload processorsClient-side browser applications parsing user-supplied MP4 files

Affected Versions Detail

Product
Affected Versions
Fixed Version
music-metadata
Borewit
< 11.16.011.16.0
AttributeDetail
CWE IDCWE-835 / CWE-400
Attack VectorLocal (AV:L)
CVSS v3.1 Score6.2 (Medium)
Exploit StatusPoC Validated
ImpactDenial of Service (DoS) and Memory Exhaustion (OOM)
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1499Endpoint Denial of Service
Impact
CWE-835
Loop with Unreachable Exit Condition ('Infinite Loop')

The program contains an iteration loop with an exit condition that cannot be met, causing it to run indefinitely.

Known Exploits & Detection

GitHub Security AdvisoryExploit details and verification methods regarding the malformed 48-byte MP4 file.

Vulnerability Timeline

Vulnerability fix committed in version 11.16.0.
2026-09-20
GitHub Security Advisory published under ID GHSA-f94x-6692-553q.
2026-10-08
CVE-2026-107391 published to registry.
2026-10-08

References & Sources

  • [1]GitHub Security Advisory GHSA-f94x-6692-553q
  • [2]Fix Commit in music-metadata
  • [3]Pull Request #2734
  • [4]v11.16.0 Release Page
  • [5]CVE-2026-107391 on CVE.org

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•23 minutes ago•CVE-2026-126300
5.3

CVE-2026-126300: Algorithmic Complexity Denial of Service in NLTK TreebankWordTokenizer.span_tokenize

CVE-2026-126300 (GHSA-ffr9-mgrr-wcvr) is an inefficient algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) Python library affecting versions 3.2.5 prior to 3.10.4. The flaw resides in the quote-restoration routine of TreebankWordTokenizer.span_tokenize and NLTKWordTokenizer.span_tokenize, where repeated calls to list.pop(0) over matched quote tokens introduce quadratic O(n^2) time complexity. An unauthenticated remote attacker who supplies input containing long sequences of double-quote characters can exhaust CPU resources and degrade service availability.

Amit Schendel
Amit Schendel
1 views•10 min read
•about 1 hour ago•GHSA-GPWC-27CW-RH9R
5.3

CVE-2026-126301: Quadratic CPU Exhaustion in NLTK LegalitySyllableTokenizer

The Natural Language Toolkit (NLTK) versions 3.6 through 3.10.3 contain an algorithmic complexity vulnerability in the LegalitySyllableTokenizer.tokenize method. When processing tokens composed of continuous runs of vowels, an unguarded string reversal and set membership lookup loop executes in quadratic time relative to the input token length. Remote attackers capable of submitting arbitrary text to applications utilizing this tokenizer can trigger sustained single-core CPU exhaustion and application-level denial of service.

Amit Schendel
Amit Schendel
2 views•10 min read
•about 2 hours ago•CVE-2026-126304
8.7

CVE-2026-126304: Symlink Path Traversal in NLTK YCOECorpusReader

CVE-2026-126304 is a symlink path traversal vulnerability (CWE-59) in the Natural Language Toolkit (NLTK) versions 3.10.0 prior to 3.10.4. The YCOECorpusReader class constructs internal sub-readers for the 'psd' and 'pos' subdirectories using FileSystemPathPointer.join(), which relies exclusively on lexical string-prefix validation rather than canonical path resolution. An attacker who supplies a crafted YCOE corpus containing symbolic links in place of the 'psd' or 'pos' subdirectories can bypass directory confinement and read arbitrary files from sibling corpora or sensitive directories within the NLTK data sandbox.

Amit Schendel
Amit Schendel
4 views•9 min read
•about 3 hours ago•CVE-2026-128077
6.5

CVE-2026-128077: Authorization Bypass via Request Path Desynchronization in Nuxt and @nuxt/nitro-server

CVE-2026-128077 (GHSA-r99w-jh2x-3mg9) is an authorization bypass and interpretation conflict vulnerability affecting Nuxt and its underlying @nuxt/nitro-server package in versions 4.6.0 through 4.6.3. When an incoming HTTP request path begins with a double forward slash (e.g., //x/admin), the WHATWG URL parser within the Nuxt server-side page renderer interprets the initial segment as a network host/authority and resolves the remaining path (/admin) against the application's page router. Because Nitro server middleware, route-scoped serverHandlers, and Nitro routeRules evaluate the unparsed request path (//x/admin), path-based access controls, redirects, and security header policies configured for /admin fail to match and are bypassed.

Amit Schendel
Amit Schendel
5 views•10 min read
•about 4 hours ago•CVE-2026-128084
4.8

CVE-2026-128084: Integer Truncation and SQL Query Truncation in sqlite3-ruby

Prior to version 2.10.2, the sqlite3-ruby gem explicitly cast 64-bit Ruby string lengths (long) to 32-bit signed integers (int) when invoking the underlying SQLite C API. On 64-bit platforms, providing a string of 4 GiB (2^32 bytes) or larger causes integer truncation, instructing SQLite to process only a prefix of the string. This flaw affects SQL query preparation, bound parameter values, and return values from custom Ruby-defined SQL functions and aggregates, allowing trailing SQL clauses such as WHERE restrictions to be silently dropped under specific conditions.

Alon Barad
Alon Barad
5 views•11 min read
•about 5 hours ago•CVE-2026-128068
5.3

CVE-2026-128068: Regular Expression Denial of Service in rails-html-sanitizer

CVE-2026-128068 (GHSA-cpgf-5mjf-73p7) is a Regular Expression Denial of Service (ReDoS) vulnerability in the rails-html-sanitizer Ruby gem affecting versions 1.0.3 through 1.7.1. The flaw resides in the Rails::HTML::PermitScrubber#scrub_attribute method, which uses the multiline regular expression /^\s*[^#\s].*/m to enforce local-only URI fragment references on SVG elements. On Ruby runtimes prior to version 3.2 (CRuby <= 3.1 and JRuby), evaluating an attribute value composed of repeated newline and whitespace characters without a hash character triggers quadratic backtracking O(n^2). Applications are only vulnerable if their sanitization allowlist is explicitly configured to permit SVG reference elements such as <use> alongside href or xlink:href attributes.

Alon Barad
Alon Barad
6 views•9 min read