Skip to content
Fencer Vulns
high 8.1

CVE-2021-42387 json

Heap out-of-bounds read in Clickhouse's LZ4 compression codec when parsing a malicious query.

published 2022-03-14 4 y ago modified 2026-06-17 4 mo ago also EUVD-2021-29358

cvss
8.1
version 3.1, NVD
cisa kev
Not listed
not in CISA's catalog
epss
1.6%
EPSS 1.6% chance of exploitation in 30 days, percentile 75%
public exploits
0
none known

Summary

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 upper bounds of the source of the copy operation.

Patch / fix

  • yandex clickhouse 21.10.2.15-stable
  • clickhouse Debian 12 18.16.1+ds-7.3

debian advisories DEBIAN-CVE-2021-42387

  • clickhouse Ubuntu 20.04 LTS 18.16.1+ds-7ubuntu0.1

ubuntu advisories UBUNTU-CVE-2021-42387

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

Exploit prediction

1.57% chance of exploitation in the next 30 days, higher than 75% of all scored CVEs (FIRST EPSS, 2026-11-08).

Exploits and checks

  • jfrog.com https://jfrog.com/blog/7-rce-and-dos-vulnerabilities-found-in-clickhouse-dbms referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
NVD 3.1 8.1 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
NVD 2.0 5.5 AV:N/AC:L/Au:S/C:P/I:N/A:P

Affected products

  • yandex clickhouse

Classification

Weakness

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.