Oct 8, 2026·5 min read·13 visits
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.
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.
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.
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
}
}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.
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.
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
music-metadata Borewit | < 11.16.0 | 11.16.0 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-789 |
| Attack Vector | Local |
| CVSS Score | 6.2 |
| EPSS Score | Not Available |
| Impact | Denial of Service (DoS) |
| Exploit Status | poc |
| KEV Status | Not Listed |
The product allocates memory based on an untrusted, unchecked input value, which can lead to a denial of service due to memory exhaustion.
An algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) before version 3.10.4 allows remote unauthenticated attackers to cause a denial of service via crafted Combinatory Categorial Grammar (CCG) lexicon strings. The parser in nltk.ccg.lexicon.fromstring performs repeated immutable string slicing, concatenation, and regex tail capturing, resulting in O(n^2) CPU consumption when processing wide, flat category definitions.
CVE-2026-126295 (also tracked as GHSA-fg9w-wfp5-j933) is a path confinement bypass vulnerability in the Natural Language Toolkit (NLTK) affecting versions 3.10.0 prior to 3.10.4. The flaw resides in nltk/parse/bllip.py within the BllipParser class and its factory method BllipParser.from_unified_model_dir(). Unlike sibling tool wrappers in NLTK that enforce data-root confinement via the nltk.pathsec module, BllipParser passes caller-supplied filesystem paths directly into the third-party bllipparser native C extension without validation. When an application passes untrusted input as model paths or directories to BllipParser, an attacker can force the native extension to open arbitrary files on the local filesystem. This leads to information disclosure through parser diagnostic oracles, local model tampering via shared directories, and denial of service by hanging worker threads on blocking special files (such as FIFOs or device nodes) or exhausting memory via oversized files.
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.
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.
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.
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.