Out-of-bounds Read Affecting clickhouse/clickhouse package, versions [,21.10.2.15-stable)


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.1% (42nd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-UNMANAGED-CLICKHOUSECLICKHOUSE-3104641
  • published4 Nov 2022
  • disclosed4 Nov 2022
  • creditJFrog Security Research Team

Introduced: 4 Nov 2022

CVE-2021-42388  (opens in a new tab)
CWE-125  (opens in a new tab)

How to fix?

Upgrade clickhouse/clickhouse to version 21.10.2.15-stable or higher.

Overview

Affected versions of this package are vulnerable to Out-of-bounds Read in the 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.

Workaround

Users who are unable to upgrade to the fixed version should add firewall rules in the server that will restrict the access to the web port (8123) and the TCP server’s port (9000) to specific clients only.

CVSS Scores

version 3.1