yawkat LZ4 Java: LZ4BlockInputStream with stopOnEmptyBlock=false recurses once per empty block, causing StackOverflowError
### Summary When `LZ4BlockInputStream` is configured with `stopOnEmptyBlock = false` (the mode for reading concatenated block streams), it handles each empty block by calling `refill()` recursively. A long run of empty blocks exhausts the thread stack and throws `StackOverflowError` out of `read()` or `skip()`. ### Details In `net.jpountz.lz4.LZ4BlockInputStream.refill()`: ```java if (originalLen == 0 && compressedLen == 0) { if (check != 0) { throw new IOException("Stream is corrupted"); } if (!stopOnEmptyBlock) { refill(); } else { finished = true; } return; } ``` Each well-formed empty block is 21 bytes and adds one stack frame, with no limit on nesting depth. In local testing, around 10,000 to 100,000 consecutive empty blocks (about 210 KB to 2.1 MB, depending on JIT state and thread stack size) threw `StackOverflowError`. `StackOverflowError` is an `Error`, not an `IOException`, so callers that only handle I/O errors for corrupt input don't catch it. ### Impact Applications that decode attacker-controlled `LZ4Block` streams with `LZ4BlockInputStream.newBuilder().withStopOnEmptyBlock(false)` or the deprecated `LZ4BlockInputStream(InputStream, boolean)` constructor can have the decoding thread fail with `StackOverflowError`. The default configuration (`stopOnEmptyBlock = true`) is not affected. There is no memory corruption. Availability impact only. ### Patch Fixed in lz4-java 1.11.4. Empty blocks are now skipped in a loop instead of by recursion, so any number of consecu
- Products
- at.yawk.lz4:lz4-java, org.lz4:lz4-java
- Affected versions
- 1.10.0, 1.10.1, 1.10.2, 1.10.3, 1.10.4, 1.11.0, 1.11.1, 1.11.2, 1.11.3, 1.4, 1.4.0, 1.4.1, 1.5.0, 1.5.1, 1.6.0, 1.7.0, 1.7.1, 1.8.0, 1.8.1, 1.9.0
- Fixed versions
- 1.11.4
- CVEs
- CVE-2026-106449
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 28 Oct 2026, 08:48 UTC · Revision 1
Source evidence
yawkat LZ4 Java: LZ4BlockInputStream with stopOnEmptyBlock=false recurses once per empty block, causing StackOverflowError
core-osv · Original sourcePublished 7 Oct 2026, 20:35 UTC
### Summary When `LZ4BlockInputStream` is configured with `stopOnEmptyBlock = false` (the mode for reading concatenated block streams), it handles each empty block by calling `refill()` recursively. A long run of empty blocks exhausts the thread stack and throws `StackOverflowError` out of `read()` or `skip()`. ### Details In `net.jpountz.lz4.LZ4BlockInputStream.refill()`: ```java if (originalLen == 0 && compressedLen == 0) { if (check != 0) { throw new IOException("Stream is corrupted"); } if (!stopOnEmptyBlock) { refill(); } else { finished = true; } return; } ``` Each well-formed empty block is 21 bytes and adds one stack frame, with no limit on nesting depth. In local testing, around 10,000 to 100,000 consecutive empty blocks (about 210 KB to 2.1 MB, depending on JIT state and thread stack size) threw `StackOverflowError`. `StackOverflowError` is an `Error`, not an `IOException`, so callers that only handle I/O errors for corrupt input don't catch it. ### Impact Applications that decode attacker-controlled `LZ4Block` streams with `LZ4BlockInputStream.newBuilder().withStopOnEmptyBlock(false)` or the deprecated `LZ4BlockInputStream(InputStream, boolean)` constructor can have the decoding thread fail with `StackOverflowError`. The default configuration (`stopOnEmptyBlock = true`) is not affected. There is no memory corruption. Availability impact only. ### Patch Fixed in lz4-java 1.11.4. Empty blocks are now skipped in a loop instead of by recursion, so any number of consecu
osv:GHSA-343h-94h5-c4wr
at.yawk.lz4:lz4-java
Fixed versions: 1.11.4
org.lz4:lz4-java
Fixed versions: Not specified
Complete source record
{
"id": "22fd14d481d675d05c4fa47c0a068e651ec153c0fbcac3067deb89e1803df573",
"url": "https://osv.dev/vulnerability/GHSA-343h-94h5-c4wr",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "yawkat LZ4 Java: LZ4BlockInputStream with stopOnEmptyBlock=false recurses once per empty block, causing StackOverflowError",
"summary": "### Summary When `LZ4BlockInputStream` is configured with `stopOnEmptyBlock = false` (the mode for reading concatenated block streams), it handles each empty block by calling `refill()` recursively. A long run of empty blocks exhausts the thread stack and throws `StackOverflowError` out of `read()` or `skip()`. ### Details In `net.jpountz.lz4.LZ4BlockInputStream.refill()`: ```java if (originalLen == 0 && compressedLen == 0) { if (check != 0) { throw new IOException(\"Stream is corrupted\"); } if (!stopOnEmptyBlock) { refill(); } else { finished = true; } return; } ``` Each well-formed empty block is 21 bytes and adds one stack frame, with no limit on nesting depth. In local testing, around 10,000 to 100,000 consecutive empty blocks (about 210 KB to 2.1 MB, depending on JIT state and thread stack size) threw `StackOverflowError`. `StackOverflowError` is an `Error`, not an `IOException`, so callers that only handle I/O errors for corrupt input don't catch it. ### Impact Applications that decode attacker-controlled `LZ4Block` streams with `LZ4BlockInputStream.newBuilder().withStopOnEmptyBlock(false)` or the deprecated `LZ4BlockInputStream(InputStream, boolean)` constructor can have the decoding thread fail with `StackOverflowError`. The default configuration (`stopOnEmptyBlock = true`) is not affected. There is no memory corruption. Availability impact only. ### Patch Fixed in lz4-java 1.11.4. Empty blocks are now skipped in a loop instead of by recursion, so any number of consecu",
"evidence": "osv:GHSA-343h-94h5-c4wr",
"products": [
{
"name": {
"value": "at.yawk.lz4:lz4-java",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "1.11.4",
"evidence": "/affected/0/ranges"
}
],
"affected_versions": [
{
"value": "1.10.0",
"evidence": "/affected/0/versions"
},
{
"value": "1.10.1",
"evidence": "/affected/0/versions"
},
{
"value": "1.10.2",
"evidence": "/affected/0/versions"
},
{
"value": "1.10.3",
"evidence": "/affected/0/versions"
},
{
"value": "1.10.4",
"evidence": "/affected/0/versions"
},
{
"value": "1.11.0",
"evidence": "/affected/0/versions"
},
{
"value": "1.11.1",
"evidence": "/affected/0/versions"
},
{
"value": "1.11.2",
"evidence": "/affected/0/versions"
},
{
"value": "1.11.3",
"evidence": "/affected/0/versions"
},
{
"value": "1.8.1",
"evidence": "/affected/0/versions"
},
{
"value": "1.9.0",
"evidence": "/affected/0/versions"
}
]
},
{
"name": {
"value": "org.lz4:lz4-java",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "1.4",
"evidence": "/affected/1/versions"
},
{
"value": "1.4.0",
"evidence": "/affected/1/versions"
},
{
"value": "1.4.1",
"evidence": "/affected/1/versions"
},
{
"value": "1.5.0",
"evidence": "/affected/1/versions"
},
{
"value": "1.5.1",
"evidence": "/affected/1/versions"
},
{
"value": "1.6.0",
"evidence": "/affected/1/versions"
},
{
"value": "1.7.0",
"evidence": "/affected/1/versions"
},
{
"value": "1.7.1",
"evidence": "/affected/1/versions"
},
{
"value": "1.8.0",
"evidence": "/affected/1/versions"
},
{
"value": "1.8.1",
"evidence": "/affected/1/versions"
}
]
}
],
"severity": "low",
"structured": {
"id": "GHSA-343h-94h5-c4wr",
"aliases": [
"CVE-2026-106449",
"GHSA-343h-94h5-c4wr"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "1.11.4"
}
]
}
],
"package": {
"name": "at.yawk.lz4:lz4-java",
"purl": "pkg:maven/at.yawk.lz4/lz4-java",
"ecosystem": "Maven"
},
"versions": [
"1.10.0",
"1.10.1",
"1.10.2",
"1.10.3",
"1.10.4",
"1.11.0",
"1.11.1",
"1.11.2",
"1.11.3",
"1.8.1",
"1.9.0"
],
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-343h-94h5-c4wr/GHSA-343h-94h5-c4wr.json",
"last_known_affected_version_range": "<= 1.11.3"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"last_affected": "1.8.1"
}
]
}
],
"package": {
"name": "org.lz4:lz4-java",
"purl": "pkg:maven/org.lz4/lz4-java",
"ecosystem": "Maven"
},
"versions": [
"1.4",
"1.4.0",
"1.4.1",
"1.5.0",
"1.5.1",
"1.6.0",
"1.7.0",
"1.7.1",
"1.8.0",
"1.8.1"
],
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-343h-94h5-c4wr/GHSA-343h-94h5-c4wr.json"
}
}
],
"modified": "2026-10-07T20:45:07.306709237Z",
"provider": "osv",
"references": [
"https://github.com/yawkat/lz4-java/security/advisories/GHSA-343h-94h5-c4wr",
"https://nvd.nist.gov/vuln/detail/CVE-2026-106449",
"https://github.com/yawkat/lz4-java/commit/c8ebf97d504fb34434fda46fc761e8202570e0d8",
"https://github.com/yawkat/lz4-java",
"https://github.com/yawkat/lz4-java/releases/tag/v1.11.4"
],
"provider_metadata": {
"cwe_ids": [
"CWE-674"
],
"severity": "LOW",
"github_reviewed": true,
"nvd_published_at": "2026-10-06T20:17:26Z",
"github_reviewed_at": "2026-10-07T20:35:46Z"
}
},
"related_cves": [
{
"value": "CVE-2026-106449",
"evidence": "/aliases"
}
],
"security_relevant": true,
"severity_evidence": "/database_specific/severity"
},
"source_id": "core-osv",
"document_id": 97276,
"published_at": "2026-10-07T20:35:46+00:00"
}