CVE-2021-42388
Heap out-of-bounds read in Clickhouse's LZ4 compression codec when parsing a malicious query. As...
Heap out-of-bounds read in Clickhouse's LZ4 compression codec when parsing a malicious query. As part of the LZ4::decompressImpl() loop, a 16-bit unsigned user-supplied value ('offset') is read from the compressed data. The offset is later used in the length of a copy operation, without checking the lower bounds of the source of the copy operation.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- None
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
8.1
Heap out-of-bounds read in Clickhouse's LZ4 compression codec when parsing a malicious query. As part of the LZ4::decompressImpl() loop, a 16-bit unsigned user-supplied value ('offset') is read from the compressed data. The offset is later used in the length of a copy operation, without checking the lower bounds of the source of the copy operation.
- Record
CVE-2021-42388- CVSS 3.1
- 8.1 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H - CVSS 2.0
- 5.5 Medium
AV:N/AC:L/Au:S/C:P/I:N/A:P - Weakness
- CWE-125
- Updated
- 2026-11-02
CVE List No score
Heap out-of-bounds read in Clickhouse's LZ4 compression codec when parsing a malicious query. As part of the LZ4::decompressImpl() loop, a 16-bit unsigned user-supplied value ('offset') is read from the compressed data. The offset is later used in the length of a copy operation, without checking the lower bounds of the source of the copy operation.
- Record
CVE-2021-42388- Weakness
- CWE-125
- Updated
- 2026-11-02
EUVDEUVD-2021-29359 No score
Heap out-of-bounds read in Clickhouse's LZ4 compression codec when parsing a malicious query. As part of the LZ4::decompressImpl() loop, a 16-bit unsigned user-supplied value ('offset') is read from the compressed data. The offset is later used in the length of a copy operation, without checking the lower bounds of the source of the copy operation.
- Record
EUVD-2021-29359- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-gg7g-5hm7-ggx5
8.1
Heap out-of-bounds read in Clickhouse's LZ4 compression codec when parsing a malicious query. As...
Heap out-of-bounds read in Clickhouse's LZ4 compression codec when parsing a malicious query. As part of the LZ4::decompressImpl() loop, a 16-bit unsigned user-supplied value ('offset') is read from the compressed data. The offset is later used in the length of a copy operation, without checking the lower bounds of the source of the copy operation.
- Record
GHSA-gg7g-5hm7-ggx5- CVSS 3.1
- 8.1 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H - Weakness
- CWE-125
- Updated
- 2026-11-02
OSV
8.1
Heap out-of-bounds read in Clickhouse's LZ4 compression codec when parsing a malicious query. As part of the LZ4::decompressImpl() loop, a 16-bit unsigned user-supplied value ('offset') is read from the compressed data. The offset is later used in the length of a copy operation, without checking the lower bounds of the source of the copy operation.
- Record
CVE-2021-42388- CVSS 3.1
- 8.1 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H - Updated
- 2026-11-02
OSVDEBIAN-CVE-2021-42388
8.1
Heap out-of-bounds read in Clickhouse's LZ4 compression codec when parsing a malicious query. As part of the LZ4::decompressImpl() loop, a 16-bit unsigned user-supplied value ('offset') is read from the compressed data. The offset is later used in the length of a copy operation, without checking the lower bounds of the source of the copy operation.
- Record
DEBIAN-CVE-2021-42388- CVSS 3.1
- 8.1 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H - Updated
- 2026-11-02
OSVUBUNTU-CVE-2021-42388
8.1
Heap out-of-bounds read in Clickhouse's LZ4 compression codec when parsing a malicious query. As part of the LZ4::decompressImpl() loop, a 16-bit unsigned user-supplied value ('offset') is read from the compressed data. The offset is later used in the length of a copy operation, without checking the lower bounds of the source of the copy operation.
- Record
UBUNTU-CVE-2021-42388- CVSS 3.1
- 8.1 High
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H - Updated
- 2026-11-02
OSVUSN-6933-1 No score
clickhouse vulnerabilities
It was discovered that ClickHouse incorrectly handled memory, leading to a heap out-of-bounds data read. An attacker could possibly use this issue to cause a denial of service, or leak sensitive information. (CVE-2021-42387, CVE-2021-41388)
It was discovered that ClickHouse incorrectly handled memory, leading to a heap-based buffer overflow. An attacker could possibly use this issue to cause a denial of service, or execute arbitrary code. (CVE-2021-43305)
- Record
USN-6933-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
clickhouseDebian:12 |
before 18.16.1+ds-7.3 | 18.16.1+ds-7.3 |
clickhouseDebian:10 |
before 18.16.1+ds-4+deb10u1, plus listed versions 18.16.1+ds-4 |
18.16.1+ds-4+deb10u1 |
clickhouseUbuntu:20.04:LTS |
before 18.16.1+ds-7ubuntu0.1, plus listed versions 18.16.1+ds-518.16.1+ds-5ubuntu118.16.1+ds-5ubuntu218.16.1+ds-6ubuntu118.16.1+ds-7 |
18.16.1+ds-7ubuntu0.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2021-42388 is a high vulnerability (CVSS 8.1) in Clickhouse, published March 14, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.57%, the 75th percentile. Fixed in clickhouse 18.16.1+ds-7.3.
References
jfrog.com/blog/7-rce-and-dos-vulnerabilities-found-in-clickhouse-dbms
lists.debian.org/debian-lts-announce/2022/11/msg00002.html
nvd.nist.gov/vuln/detail/CVE-2021-42388
github.com/advisories/GHSA-gg7g-5hm7-ggx5
security-tracker.debian.org/tracker/CVE-2021-42388
ubuntu.com/security/CVE-2021-42388
Show 7 moreShow less
github.com/ClickHouse/ClickHouse/commit/2aea1c8d4a5be320365472052d8a48bf69fd9fe9
github.com/ClickHouse/ClickHouse/commit/6d83eacec42c7c403c99804a713a9d38caa4a45d
github.com/ClickHouse/ClickHouse/pull/27136
cve.org/CVERecord?id=CVE-2021-42388
ubuntu.com/security/notices/USN-6933-1
ubuntu.com/security/CVE-2021-42387
ubuntu.com/security/CVE-2021-43305