Skip to content

Heap buffer overflow in T64 codec decompression

High
santrancisco published GHSA-g22g-p6q2-x39v Dec 18, 2023

Package

ClickHouse Cloud (ClickHouse Cloud)

Affected versions

< v23.9.2.47475

Patched versions

v23.9.2.47475
ClickHouse v23.10 (ClickHouse v23.10)
< v23.10.2.13
v23.10.2.13
ClickHouse v23.3 (ClickHouse v23.3)
< v23.3.16.7
v23.3.16.7
ClickHouse v23.8 (ClickHouse v23.8)
< v23.9.4.11
v23.9.4.11
ClickHouse v23.9 (ClickHouse v23.9)
< v23.8.6.16
v23.8.6.16

Description

Impact

A heap buffer overflow issue was discovered in ClickHouse server. An attacker could send a specially crafted payload to the native interface exposed by default on port 9000/tcp, triggering a bug in the decompression logic of T64 codec that crashes the ClickHouse server process. This attack does not require authentication.

Note that this exploit can also be triggered via HTTP protocol, however, the attacker will need a valid credential as the HTTP authentication take places first.

Patches

Fix has been pushed to version v23.10.2.13-stable, v23.9.4.11-stable, v23.8.6.16-lts, v23.3.16.7-lts

Workarounds

Affected users are advised to block native port access and temporary switch to HTTP protocol to reduce the exposure before they can upgrade to supported versions.

Backport

If you are maintaining your own forked version of ClickHouse. The fix for this vulnerability can be found in this pull request.

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:H

CVE ID

CVE-2023-47118

Weaknesses

No CWEs

Credits