CVE-2021-42387 Memory corruption in clickhouse

High 8.1 Published Updated

An attacker can trigger a heap out-of-bounds read in ClickHouse via a malicious query, potentially causing a crash or leaking memory.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2021-42387?

CVE-2021-42387 is a high-severity memory corruption vulnerability in Debian Debian Linux, published on 14 Mar 2022. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

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.

Weakness: CWE-125

Which versions are affected by CVE-2021-42387?

It affects 2 products.

Products include Clickhouse Clickhouse, Debian Debian Linux.

How do I fix CVE-2021-42387?

Upgrade to a fixed version.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2021-42387 being exploited?

There is no known exploitation of CVE-2021-42387 in the wild and no public exploit code.

All Debian Debian Linux vulnerabilities

Sources

Also known as DEBIAN-CVE-2021-42387, GHSA-cf9g-639p-3wvv, UBUNTU-CVE-2021-42387.

Is CVE-2021-42387 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free