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

CVE-2026-107387: Uncontrolled Memory Allocation (OOM) in music-metadata APEv2 Parser

Amit Schendel
Amit Schendel
Senior Security Researcher

Oct 8, 2026·5 min read·15 visits

Executive Summary (TL;DR)

A vulnerability in music-metadata (< 11.16.0) allows remote attackers to cause a Denial of Service (DoS) via an Out Of Memory (OOM) crash by uploading a tiny (134-byte) audio file containing a forged APEv2 tag size value.

CVE-2026-107387 is a high-impact uncontrolled memory allocation vulnerability in music-metadata, a widely used Node.js metadata parser. The flaw occurs in the APEv2 tag parser, where the library reads an attacker-controlled 32-bit integer indicating the tag size and immediately requests a corresponding heap buffer reservation. Because this allocation occurs before validating if the input stream actually contains those bytes, an attacker can supply a minuscule audio file to trigger large, disproportionate allocations, resulting in heap exhaustion and an uncatchable process-wide Out of Memory (OOM) crash.

Vulnerability Context and Attack Surface

The NPM package music-metadata is a widely integrated Node.js library designed to parse metadata from audio and video files. It supports a variety of formats, including Monkey's Audio (.ape), which relies on APEv2 tags to store structured metadata. These tags can contain text fields, external links, or binary data payloads such as cover-art images.

Because metadata parsing is commonly integrated into automated file upload pipelines, media servers, and ingestion queues, the parser is exposed to untrusted files provided directly by users. A vulnerability within this processing layer bypasses typical application-level checks, as the payload is parsed programmatically and immediately upon file receipt.

The attack surface is highly accessible because it does not require authentication or application-level privileges. An attacker simply needs to submit a malformed file to any ingestion endpoint that extracts audio metadata, making this a practical mechanism for targeted Denial of Service attacks against host processes.

Root Cause Analysis: Eager Heap Reservation

The technical flaw stems from the parser's trust in metadata header declarations prior to confirming physical stream boundaries. This issue represents a classic implementation of CWE-789 (Memory Allocation with Excessive Size Value). When reading APEv2 structures, the file parser relies on a 32-bit unsigned little-endian integer to determine the size of incoming binary payloads, such as cover-art structures.

In vulnerable versions of music-metadata (< 11.16.0), the library reads this 32-bit length field and immediately invokes the V8 engine's allocator to instantiate a backing Uint8Array. In Node.js, calling new Uint8Array(size) instantly claims physical and virtual memory spaces on the heap.

If the actual input file is truncated (for example, containing only 134 bytes but claiming an image payload of 128 MiB), the subsequent read operations on the input stream inevitably fail, throwing an EndOfStreamError. However, because the Uint8Array allocation occurred prior to this read attempt, the physical heap memory is already reserved. If multiple such requests are processed concurrently, the memory utilization spikes exponentially, exhausting system memory and triggering a process-level Out of Memory (OOM) crash.

Code-Level Vulnerability & Patch Analysis

The vulnerable file path is located in the APEv2 processing logic, specifically inside lib/apev2/APEv2Parser.ts. The old code performed an unvalidated read sequence:

// VULNERABLE IMPLEMENTATION
// Instantiates the full array directly from the unverified tagItemHeader.size variable
const picData = new Uint8Array(tagItemHeader.size);
await this.tokenizer.readBuffer(picData);

To resolve this vulnerability, commit b3bf52cb6021b046f33ba47583e19ab8f10dd235 introduced two principal mitigation mechanisms: strict boundary validations and a chunked stream reader.

First, the updated parser checks the requested item size against the remaining bytes in the tag block (bytesRemaining) and the total file size (when known from the stream context):

// PATCHED IMPLEMENTATION
const tagItemHeader = await this.tokenizer.readToken<ITagItemHeader>(TagItemHeader);
bytesRemaining -= TagItemHeader.len;
 
if (tagItemHeader.size >= bytesRemaining) {
  throw new ApeContentError(`Invalid tag item size: ${tagItemHeader.size}`);
}
 
if (this.tokenizer.fileInfo.size !== undefined &&
  tagItemHeader.size > this.tokenizer.fileInfo.size - this.tokenizer.position) {
  throw new ApeContentError(`Invalid tag item size: ${tagItemHeader.size}`);
}

Second, to handle streaming inputs where the overall file size cannot be verified upfront (e.g., live network sockets), the library introduced a bounded streaming buffer reader (readTagValue). This method restricts instant allocation sizes to a safe block limit of 64 KiB, allocating subsequent segments incrementally as data packets actually arrive:

private async readTagValue(size: number): Promise<Uint8Array> {
  const chunkSize = 64 * 1024;
  if ((!this.tokenizer.supportsRandomAccess() || this.tokenizer.fileInfo.size === undefined) && size > chunkSize) {
    const chunks: Uint8Array[] = [];
    for (let remaining = size; remaining > 0;) {
      const chunk = new Uint8Array(Math.min(remaining, chunkSize));
      await this.tokenizer.readBuffer(chunk);
      chunks.push(chunk);
      remaining -= chunk.length;
    } 
    // Rest of chunk collation follows
  }
}

Exploitation Methodology & Proof of Concept

To exploit this vulnerability, an attacker constructs a minimal binary file containing the structurally valid outer headers of a Monkey's Audio (.ape) container. Inside the APEv2 tag section (APETAGEX), the attacker inserts a tag key (such as Cover Art (Front)) followed by a binary header indicating an inflated payload size, such as 0x08000000 (128 MiB).

Because the layout is verified by the outer parser, the application navigates directly to the APEv2 parser block. Upon extracting the tag item, the code executes new Uint8Array(134217728) to prepare the cover-art container. The application attempts to allocate 128 MiB of memory from the V8 heap, which is immediately dedicated to the buffer backing store. This occurs before the library attempts to stream the actual metadata contents.

When the parser subsequently attempts to read the 128 MiB from the 134-byte payload, it throws an EndOfStreamError. However, because memory allocation was successful, the application retains the allocated memory blocks. Sending multiple parallel parse requests of this type easily triggers heap exhaustion, crashing the single-threaded Node.js worker process.

Impact Assessment & Remediation Guidance

The impact of this vulnerability is a high-availability threat (Denial of Service). In single-threaded JavaScript execution environments such as Node.js, an Out of Memory (OOM) error terminates the current process instantly. This can cause severe operational issues for APIs, queues, and containerized microservices that process user uploads.

To address this vulnerability, security administrators and developers should immediately update the music-metadata dependency to version 11.16.0 or higher. This update changes the parser's allocation model and implements bounds checking to prevent large, unverified memory reservations.

> [!NOTE] > If updating the library is not immediately feasible, teams can mitigate risks by implementing file size limits at the application layer, blocking ingestion of files with the audio/ape MIME type, or running metadata parsing within isolated, sandboxed subprocesses.

Official Patches

BorewitOfficial patch fixing the eager allocation vector in the APEv2 parser.

Fix Analysis (1)

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 Borewit music-metadata library versions prior to 11.16.0Node.js media ingestion pipelines parsing APEv2/Monkey's Audio files

Affected Versions Detail

Product
Affected Versions
Fixed Version
music-metadata
Borewit
< 11.16.011.16.0
AttributeDetail
CWE IDCWE-789
Attack VectorLocal
CVSS Score6.2
EPSS ScoreNot Available
ImpactDenial of Service (DoS)
Exploit Statuspoc
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1499Endpoint Denial of Service
Impact
CWE-789
Memory Allocation with Excessive Size Value

The product allocates memory based on an untrusted, unchecked input value, which can lead to a denial of service due to memory exhaustion.

Known Exploits & Detection

GitHub Advisory DatabaseA fully functional proof-of-concept payload demonstrating process crash using a small (134 bytes) crafted APE file.

Vulnerability Timeline

Remediation patch committed to repository
2026-09-22
Official security advisory GHSA-53v6-4h7p-p4gj published
2026-10-08
CVE-2026-107387 assigned and published to NVD
2026-10-08
Fixed version 11.16.0 officially released
2026-10-08

References & Sources

  • [1]GitHub Security Advisory GHSA-53v6-4h7p-p4gj
  • [2]Fix Commit b3bf52c
  • [3]Pull Request #2744: APEv2 Validation Patches
  • [4]Release v11.16.0 Announcement
  • [5]music-metadata Project Repository

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

•1 day ago•CVE-2026-58254
6.5

CVE-2026-58254: Authorization Bypass in NATS Server Message Tracing for Leaf Node Connections

NATS Server prior to versions 2.12.8 and 2.14.3 contains an incorrect authorization vulnerability (CWE-863) in its message tracing subsystem. When evaluating whether a connection is permitted to publish trace events to a destination subject specified in the Nats-Trace-Dest header, the server only checks standard client permissions and omits permission checks for leaf node connections. This allows a connected leaf node operator with restricted publishing privileges to emit internal trace events to unauthorized subjects and suppress standard message delivery using the Nats-Trace-Only header.

Alon Barad
Alon Barad
8 views•10 min read
•1 day ago•CVE-2026-63341
7.5

CVE-2026-63341: Unauthenticated Denial of Service via Unbounded Topic Depth in Aedes MQTT Broker

CVE-2026-63341 is a high-severity Denial of Service (DoS) vulnerability in the Aedes MQTT broker for Node.js affecting all versions prior to 1.1.1. The flaw stems from missing input validation on the hierarchical depth of incoming MQTT topic strings before they are passed to the underlying topic-matching engine, qlobber. Because qlobber enforces a hardcoded limit of 100 topic levels and throws a synchronous exception when this threshold is exceeded, an attacker can send a single MQTT packet containing 101 or more forward-slash-separated levels to trigger an uncaught exception that immediately terminates the Node.js broker process.

Alon Barad
Alon Barad
14 views•12 min read
•1 day ago•CVE-2026-61725
6.1

CVE-2026-61725: Path Traversal and Arbitrary File Overwrite in sevenz-rust2

CVE-2026-61725 is a path traversal vulnerability (CWE-22) in the sevenz-rust2 Cargo package prior to version 0.21.1. The vulnerability occurs because the decompression utility fails to validate or sanitize archive entry filenames before joining them with the destination directory path via std::path::Path::join. An attacker who supplies a crafted 7z archive containing parent directory traversal sequences or absolute paths can write or overwrite arbitrary files on the host filesystem with the privileges of the extracting process.

Alon Barad
Alon Barad
6 views•12 min read
•1 day ago•CVE-2026-77309
8.8

CVE-2026-77309: Unauthenticated Remote Code Execution in NASA-AMMOS AIT-GUI via Incomplete File Cleanup and Path Traversal

CVE-2026-77309 (GHSA-jrjx-9jjw-747m) is a high-severity unauthenticated remote code execution vulnerability affecting NASA-AMMOS AIT-GUI versions 1.0.0 through 2.5.0. The flaw results from chaining an incomplete file cleanup error in the telemetry query endpoint (/tlm/query) with a directory traversal flaw in the script execution endpoint (/script/run). An attacker on an adjacent network can stage arbitrary Python statements into a static file on disk and execute that file under the privileges of the AIT-GUI web server process.

Amit Schendel
Amit Schendel
13 views•10 min read
•2 days ago•CVE-2026-77332
2.3

CVE-2026-77332: Surfaced-Memory Envelope Injection and Stored Prompt Injection in memtomem-stm

A vulnerability classified under CWE-116 (Improper Encoding or Escaping of Output) exists in memtomem-stm versions 0.1.0 through 0.1.33. The software acts as a Model Context Protocol (MCP) short-term memory proxy gateway for AI agent architectures. When surfacing retrieved memories and scratchpad items into downstream Large Language Model (LLM) context envelopes, the SurfacingFormatter component fails to properly sanitize untrusted memory attributes. An attacker with the ability to plant untrusted content into the agent's long-term or working memory store can inject arbitrary structural delimiters, close the <surfaced-memories> XML boundary prematurely, visually obscure instructions using Unicode bidirectional overrides, and execute stored prompt injection attacks against downstream LLM agents.

Alon Barad
Alon Barad
17 views•10 min read
•2 days ago•CVE-2026-77331
2.0

CVE-2026-77331: Race Condition and Session State Corruption in memtomem-stm

CVE-2026-77331 (GHSA-72jh-722p-rqr3) is a concurrency and session-state synchronization vulnerability in memtomem-stm, a short-term memory proxy gateway for AI agents. In versions 0.1.2 prior to 0.1.34, concurrent Model Context Protocol (MCP) Remote Procedure Call (RPC) failures or mid-flight task cancellations can initiate duplicate reconnect loops and permit dirty or cancelled transport sessions to be reused. This deficiency results in session-state integrity loss and local service degradation.

Amit Schendel
Amit Schendel
8 views•9 min read