# CVE-2021-43304: clickhouse: Heap buffer overflow in Clickhouse's LZ4 compression codec when parsing a malicious query

CVE-2021-43304 is fixed in clickhouse on 1 platform by DEBIAN-CVE-2021-43304 (version 18.16.1+ds-7.3), released March 14, 2022. It is not reported as exploited. Patch Radar priority: High.

- Web page: https://patchblox.com/security/cve/CVE-2021-43304
- Priority: High
- CVSS: 8.8 (high)
- EPSS: 0.0167
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Mar 14, 2022

## Description

Heap buffer overflow in Clickhouse's LZ4 compression codec when parsing a malicious query. There is no verification that the copy operations in the LZ4::decompressImpl loop and especially the arbitrary copy operation wildCopy<copy_amount>(op, ip, copy_end), don’t exceed the destination buffer’s limits.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | clickhouse Debian 12.15 (bookworm) | 18.16.1+ds-7.3 | [DEBIAN-CVE-2021-43304](https://patchblox.com/security/data/fix/linux/debian-cve-2021-43304.md) | Mar 14, 2022 |

---

Data as of 2026-11-09T07:25:28Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
