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

CVE-2026-106450: Denial of Service via Eager Resource Allocation in lz4-java LZ4FrameInputStream

Alon Barad
Alon Barad
Software Engineer

Oct 8, 2026·8 min read·4 visits

Executive Summary (TL;DR)

lz4-java is vulnerable to a CPU and memory allocation Denial of Service. Eager buffer allocation during header parsing allows attackers to stream minimal, 11-byte empty frames that trigger repeated 8 MiB allocations, causing severe JVM Garbage Collection overhead.

A resource allocation vulnerability (CWE-770) in lz4-java before version 1.11.4 allows an unauthenticated remote attacker to trigger CPU exhaustion and high garbage collection overhead by streaming empty concatenated LZ4 frames.

Vulnerability Overview

The library lz4-java is a widely utilized compression library for Java, wrapping both JNI and native Java implementations of the LZ4 algorithm. Within this library, the class net.jpountz.lz4.LZ4FrameInputStream is responsible for decompressing streams formatted according to the LZ4 Frame Format specification. This specification supports concatenated streams, meaning a single raw input stream can consist of multiple independent LZ4 frames appended to each other, which the reader parses sequentially.\n\nPrior to version 1.11.4, a critical memory allocation vulnerability existed in the frame header parsing logic. The stream implementation eagerly allocated large internal byte buffers for each frame based on metadata declarations in the header, rather than when actual payload data blocks were read. An attacker can exploit this behavior by submitting a continuous stream of minimal, empty frames, causing the Java Virtual Machine (JVM) to spend its resources allocating and reclaiming memory.\n\nThis flaw is classified under CWE-770 (Allocation of Resources Without Limits or Throttling). It presents a significant Denial of Service (DoS) attack surface for any network-exposed application that ingests and decompresses user-supplied LZ4 data streams, such as file upload endpoints, log collectors, or message queue consumers. Because the empty frames do not produce decompressed output bytes, conventional decompressed-payload threshold checks cannot detect or restrict this CPU and memory consumption.

Root Cause Analysis

The root cause of CVE-2026-106450 lies in the timing and design of memory allocation within the LZ4FrameInputStream.readHeader() method. The LZ4 Frame format begins with a Frame Descriptor, which contains a Block Descriptor (BD) byte. This BD byte indicates the maximum size of data blocks contained within that frame. This value can specify block sizes up to 4 MiB (e.g., when the BD flag is set to 7).\n\nIn the vulnerable implementation, whenever a frame boundary was crossed, the readHeader() method parsed this BD byte and immediately allocated two byte arrays of this maximum block size: compressedBuffer and rawBuffer. Together, these buffers demanded up to 8 MiB of heap memory. This allocation occurred eagerly, prior to confirming whether the frame actually contained any data blocks.\n\nAn attacker can construct a valid, empty LZ4 frame that is only 11 bytes long. This minimal frame contains a magic number, a frame descriptor byte (FLG), a block descriptor byte (BD) claiming a 4 MiB block size, a header checksum byte (HC), and a 4-byte end-of-stream marker (EndMark) set to 0x00000000. When processing a stream of these empty frames, the stream's state machine repeatedly discards the previous frame's buffers and allocates a new set of 8 MiB buffers for each 11 bytes of input, leading to a memory allocation amplification factor of approximately 762,600 to 1.\n\nThis creates severe Garbage Collection (GC) pressure and high CPU load on the JVM. The CPU is consumed by the zero-initialization of large byte arrays, while the Garbage Collector is forced into high-frequency, stop-the-world cycles to reclaim the rapidly discarded arrays.\n\nmermaid\ngraph LR\n A["11-Byte Input Frame"] --> B["Parser reads BD Byte (0x70)"]\n B --> C["Eagerly Allocates 8 MiB Heap Space"]\n C --> D["Parser reads EndMark (0x00000000)"]\n D --> E["Frame Concludes (0 bytes output)"]\n E --> F["Buffers Discarded to GC"]\n F --> A\n

Code Analysis

The key fix in commit 2acc0ec1ead226145c62a817c18c8ed49233a283 changes buffer initialization from eager allocation during header parsing to lazy allocation during data block reading. Additionally, the new logic caches and reuses the buffers instead of re-allocating them on every new frame boundary.\n\nBelow is the comparison of the vulnerable code versus the patched code within net.jpountz.lz4.LZ4FrameInputStream.java:\n\njava\n// VULNERABLE CODE (Pre-1.11.4)\nprivate void readHeader() throws IOException {\n // ... parsing logic ...\n maxBlockSize = frameInfo.getBD().getBlockMaximumSize();\n compressedBuffer = new byte[maxBlockSize]; // Eager allocation\n rawBuffer = new byte[maxBlockSize]; // Eager allocation\n buffer = ByteBuffer.wrap(rawBuffer);\n buffer.limit(0);\n firstFrameHeaderRead = true;\n anyFrameRead = true;\n}\n\n\njava\n// PATCHED CODE (1.11.4+)\nprivate void readHeader() throws IOException {\n // ... parsing logic ...\n maxBlockSize = frameInfo.getBD().getBlockMaximumSize();\n // Allocations removed from readHeader()\n buffer.limit(0);\n firstFrameHeaderRead = true;\n anyFrameRead = true;\n}\n\n\nIn the patched code, the allocations are moved to the block-reading routine, readBlock(), and are guarded by checks to ensure buffers are only allocated when required and are reused if they are already large enough:\n\njava\n// LAZY ALLOCATION AND REUSE IN readBlock()\nprivate void readBlock() throws IOException {\n // ... state checks ...\n if (rawBuffer == null || rawBuffer.length < maxBlockSize) {\n rawBuffer = new byte[maxBlockSize];\n buffer = ByteBuffer.wrap(rawBuffer);\n buffer.limit(0); // Protect contents if block read fails\n }\n final byte[] tmpBuffer;\n if (compressed) {\n if (compressedBuffer == null || compressedBuffer.length < maxBlockSize) {\n compressedBuffer = new byte[maxBlockSize];\n }\n tmpBuffer = compressedBuffer;\n } else {\n tmpBuffer = rawBuffer;\n }\n // ... read logic ...\n}\n\n\nThis modification guarantees that if an empty frame containing no blocks is processed, no heap buffers are allocated. Furthermore, the reuse logic ensures that even for streams with many populated frames, the allocations scale with the maximum block size seen so far, rather than with the total count of frames.

Exploitation Methodology

An attacker can exploit this vulnerability by establishing a connection to a vulnerable service and transmitting a continuous stream of serialized empty frames. Because the vulnerability lies within a stream-handling class, the entire payload does not need to be buffered in memory or saved to disk before decompression begins; the JVM will process each 11-byte frame on-the-fly as it is received from the network socket.\n\nTo construct the exploit payload, the attacker must generate a series of valid LZ4 frame headers that request the maximum block size without supplying any data blocks. Below is a conceptual representation of the structure of a single 11-byte attacking frame:\n\n* Magic Number (4 bytes): 0x184D2204 (LZ4 frame identifier in little-endian format)\n* FLG Byte (1 byte): 0x40 (Specifies frame version 01 and independent blocks)\n* BD Byte (1 byte): 0x70 (Requests the maximum 4 MiB block size)\n* HC Byte (1 byte): 0x6D (A pre-calculated xxHash checksum validating the FLG and BD fields)\n* EndMark (4 bytes): 0x00000000 (Indicates the frame contains zero data blocks)\n\nAn attacker can concatenate thousands of these 11-byte blocks into a single payload file or stream. When sent to a vulnerable application, this payload results in sustained CPU exhaustion and memory instability, disabling the service for legitimate users. Because the decompressed length of the stream is zero, security layers or filters checking the ratio between compressed and decompressed size (e.g., zip-bomb mitigations) will not trigger, as no uncompressed data is ever emitted.

Impact Assessment

The impact of CVE-2026-106450 is a high-availability compromise, leading to a complete Denial of Service (DoS) of the affected Java process. Because the processing of LZ4 streams often occurs in incoming request threads (such as HTTP handlers or API endpoints), exhausting the CPU and triggering continuous garbage collection cycles degrades the performance of the entire JVM, affecting all hosted services.\n\nThis vulnerability has been assigned a CVSS v3.1 score of 5.3 (Medium), with the vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L. While the vector classifies the availability impact as low ("A:L") due to standard CVSS scoring rubrics for general library dependencies, the actual impact on real-world deployments is often a complete service failure. In environments where JVM memory parameters (such as -Xmx) are tightly bounded, the high allocation rate can trigger an OutOfMemoryError (OOM) and crash the container.\n\nFurthermore, because the attack requires very low bandwidth—a continuous stream of a few kilobytes per second can force gigabytes of heap allocations—it is highly asymmetric. It bypasses many standard rate-limiting systems because the request size is extremely small and does not violate typical payload size limitations.

Remediation and Long-Term Mitigation

The primary remediation strategy is upgrading the dependency lz4-java to version 1.11.4 or higher. This release addresses the vulnerability by implementing lazy allocation and buffer caching as detailed in the code analysis.\n\nFor environments where immediate upgrading is not possible, the following temporary mitigations should be considered:\n\n* Apply Input Rate Limits: Restrict the network throughput on endpoints known to accept LZ4 streams. Limiting incoming data transfer rate minimizes the frequency of allocation cycles.\n* Limit Concurrent Decompression Tasks: Cap the number of concurrent worker threads or asynchronous tasks that process compressed input. This bounds the total potential memory allocation overhead at any given moment.\n* Implement Connection Timeouts: Set aggressive read and idle timeouts on incoming connections to prevent slow-rate streaming attacks where an attacker slowly feeds empty frames over a prolonged period.\n\nAdditionally, developers should note a residual risk in the patched version: because the allocated buffers are cached and never shrunk, a stream that processes a single large block (e.g., 4 MiB) will retain that memory footprint for its entire lifetime. Applications should therefore avoid maintaining long-lived, persistent decompression streams for untrusted clients to prevent memory-pinning attacks.

Official Patches

yawkat/lz4-javaMain buffer allocation fix
yawkat/lz4-javaState tracking NPE fix

Fix Analysis (2)

Technical Appendix

CVSS Score
5.3/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
EPSS Probability
0.37%
Top 71% most exploited
1,000
via SCA Data

Affected Systems

Java applications utilizing lz4-java LZ4FrameInputStream for decompressionWeb applications exposing endpoints that decompress LZ4 payload dataLog parsers, ingestion engines, or streaming pipelines handling LZ4 streams

Affected Versions Detail

Product
Affected Versions
Fixed Version
lz4-java
yawkat
< 1.11.41.11.4
AttributeDetail
CWE IDCWE-770
Attack VectorNetwork
CVSS v3.15.3 (Medium)
EPSS Score0.00371 (0.37%)
Exploit StatusProof-of-Concept (PoC)
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1499Endpoint Denial of Service
Impact
CWE-770
Allocation of Resources Without Limits or Throttling

The software allocates memory or other resources based on a user-supplied size value without enforcing a limit on the maximum size, leading to resource exhaustion.

Known Exploits & Detection

GitHubConceptual discussion and advisory detailing the vulnerability mechanism and reproduction

References & Sources

  • [1]GitHub Security Advisory GHSA-gm45-99xc-r7wv
  • [2]NVD - CVE-2026-106450

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

•about 1 hour ago•CVE-2026-105647
4.0

CVE-2026-105647: Server-Side Request Forgery via Favicon Probing in Ghost CMS

An unauthenticated Server-Side Request Forgery (SSRF) vulnerability exists in Ghost CMS from version 6.54.1 to 6.65.0. The vulnerability stems from a validation bypass in the favicon resolution logic within the bookmark-fetching subsystem, which allows remote, unauthenticated attackers to trigger arbitrary HTTP requests to the local host and internal networks. This bypass circumvents the custom DNS-level IP blocklist controls configured globally in the application.

Alon Barad
Alon Barad
1 views•8 min read
•about 3 hours ago•CVE-2026-106449
3.7

CVE-2026-106449: Stack Overflow via Uncontrolled Recursion in yawkat lz4-java

A Denial of Service (DoS) vulnerability exists in the yawkat fork of lz4-java prior to version 1.11.4. Under specific non-default configurations (stopOnEmptyBlock = false), parsing crafted streams with a large sequence of contiguous empty LZ4 blocks triggers uncontrolled recursion inside the LZ4BlockInputStream.refill() method, causing stack exhaustion and thread termination.

Alon Barad
Alon Barad
3 views•6 min read
•about 3 hours ago•CVE-2026-76485
9.8

CVE-2026-76485: Remote Code Execution in Cisco NX-OS VXLAN OAM (NGOAM)

CVE-2026-76485 is a critical stack-based buffer overflow vulnerability in the VXLAN OAM (NGOAM) parsing component of Cisco NX-OS Software. The flaw enables an unauthenticated, remote attacker to execute arbitrary code with root privileges or trigger a denial of service on affected Nexus switches. This vulnerability is triggered through crafted packets sent to an IP interface. No workarounds are currently available to mitigate the vulnerability while preserving the NGOAM functionality. Cisco has published software patches to address this flaw.

Alon Barad
Alon Barad
6 views•6 min read
•about 4 hours ago•CVE-2026-106451
7.3

CVE-2026-106451: Local Privilege Escalation via JNI Extraction TOCTOU in lz4-java

A local privilege escalation and code execution vulnerability exists in the yawkat fork of lz4-java when extracting its bundled JNI shared library into the system temporary directory. Predictable path derivation and lack of exclusive file creation flags allow a local attacker to hijack library loading via a race condition.

Alon Barad
Alon Barad
6 views•6 min read
•about 5 hours ago•CVE-2026-105698
5.4

CVE-2026-105698: Missing Authorization in Deprecated Chat Vertices Endpoints in Langflow

A missing authorization vulnerability in Langflow versions 1.0.0 through 1.10.0 allows authenticated users (and unauthenticated users in versions prior to 1.7.2) to access private workflow structures and execute graph components by targeting deprecated API endpoints.

Amit Schendel
Amit Schendel
5 views•8 min read
•about 6 hours ago•CVE-2026-105697
9.9

CVE-2026-105697: OS Command Injection in Langflow Model Context Protocol Integration

A critical OS command injection vulnerability exists in Langflow's Model Context Protocol (MCP) server integration using stdio transport, allowing unauthenticated remote command execution under default configurations.

Alon Barad
Alon Barad
7 views•5 min read