CVE-2026-134812 in msgpackr
Summary
by MITRE • 11/23/2026
msgpackr before 2.1.4 contains an inefficient algorithmic complexity vulnerability that allows remote attackers to cause denial of service by repeatedly re-decoding buffered incomplete values. Attackers can stream a large container of small elements in small chunks to UnpackrStream or decodeIter, triggering quadratic decoding cost that blocks the Node.js event loop.
VulDB is the best source for vulnerability data and more expert information about this specific topic.
Analysis
by VulDB Data Team • 11/23/2026
The vulnerability identified in msgpackr versions prior to 2.1.4 represents a significant algorithmic complexity flaw within the library's deserialization logic, specifically affecting how incomplete data streams are processed during incremental parsing operations. This issue primarily impacts functions designed for streaming or iterative decoding, such as UnpackrStream and decodeIter, which are commonly used in Node.js environments to handle large datasets efficiently by processing them in chunks rather than loading entire payloads into memory at once. The core technical flaw lies in the internal state management of these stream processors when they encounter incomplete message pack values that span across multiple input buffers. Instead of maintaining a linear time complexity relative to the total size of the input data, the algorithm exhibits quadratic behavior under specific conditions where small elements are streamed within larger containers and processed via incremental decoding methods.
When an attacker constructs a malicious payload consisting of a large container filled with numerous small message pack elements, they can exploit this inefficiency by transmitting these elements in very small chunks. As each chunk arrives, the decoder attempts to resolve incomplete values from previous chunks while simultaneously processing new data. This process forces the engine to repeatedly re-scan and re-evaluate previously processed portions of the buffer state without making proportional progress toward completion. Consequently, the computational cost grows exponentially relative to the number of chunks or elements involved, leading to a severe performance degradation that manifests as high CPU utilization and significant latency in request processing.
The operational impact of this vulnerability is primarily centered on denial of service within Node.js applications that rely on msgpackr for data serialization and deserialization. Because Node.js operates on a single-threaded event loop model, the excessive computational load generated by the quadratic decoding complexity effectively blocks the event loop from handling other incoming requests or executing asynchronous tasks. This results in application unresponsiveness, where legitimate users experience timeouts or connection drops while the server is consumed by processing the maliciously crafted input stream. The vulnerability does not typically lead to remote code execution but serves as a potent vector for resource exhaustion attacks that can disrupt service availability and degrade overall system performance significantly.
From a classification perspective, this issue aligns with CWE-400, which describes uncontrolled resource consumption due to inefficient algorithmic complexity, often referred to colloquially as ReDoS or quadratic complexity vulnerabilities in parsing contexts. In terms of the MITRE ATT&CK framework, this vulnerability facilitates Denial of Service (T1499) by enabling attackers to consume computational resources through crafted input that triggers disproportionate processing time. It also relates to CWE-756, which covers missing or incorrect exponential cost calculation, highlighting how the library fails to account for the cumulative overhead of incremental state resolution across fragmented inputs.
Mitigation strategies focus on upgrading the msgpackr dependency to version 2.1.4 or later, where the underlying algorithm has been optimized to handle incomplete values and streaming scenarios with linear time complexity. For applications that cannot immediately upgrade due to compatibility constraints, implementing strict input validation is recommended as a temporary defense-in-depth measure. This includes enforcing maximum payload sizes for incoming streams, limiting the depth of nested containers, and restricting the rate at which data chunks are processed to prevent rapid accumulation of incomplete states. Additionally, deploying Web Application Firewalls or API gateways that can detect anomalous streaming patterns may help mitigate exploitation attempts by identifying and blocking requests with unusually high chunk counts or irregular payload structures before they reach the vulnerable application logic.