What’s Vulnerable › Vulnerabilities
CVE-2024-22412: ClickHouse's Role-based Access Control is bypassed when query caching is enabled.
- Severity: medium (CVSS 4.9 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.6% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2024-03-18 · updated 2026-06-17
- Weakness: CWE-863
Description
ClickHouse is an open-source column-oriented database management system. A bug exists in the cloud ClickHouse offering prior to version 24.0.2.54535 and in github.com/clickhouse/clickhouse version 23.1. Query caching bypasses the role based access controls and the policies being enforced on roles. In affected versions, the query cache only respects separate users, however this is not documented and not expected behavior. People relying on ClickHouse roles can have their access control lists bypassed if they are using query caching. Attackers who have control of a role could guess queries and see data they shouldn't have access to. Version 24.1 of ClickHouse and version 24.0.2.54535 of ClickHouse Cloud contain a patch for this issue. Based on the documentation, role based access control should be enforced regardless if query caching is enabled or not.
Affected products
- ClickHouse: from 23.3.0.0 before 23.3.22.3; from 23.8.0.0 before 23.8.12.13; from 23.12.0.0 before 23.12.6.19; from 24.0.0.0 before 24.1.1.2048 — fixed in 23.12.6.19, 23.3.22.3, 23.8.12.13, 24.1.1.2048
- Clickhouse Cloud: before 24.0.2.54535 — fixed in 24.0.2.54535
How to fix
Upgrade to a fixed version: ClickHouse 23.12.6.19, 23.3.22.3, 23.8.12.13, 24.1.1.2048; Clickhouse Cloud 24.0.2.54535. Check the vendor advisory for mitigations.
References
- https://github.com/ClickHouse/ClickHouse/blob/bd17ee769e337906c4b1f404861e042ad72fcbfc/src/Interpreters/executeQuery.cpp#L1013-L1015
- https://github.com/ClickHouse/ClickHouse/pull/58611
- https://github.com/ClickHouse/ClickHouse/security/advisories/GHSA-45h5-f7g3-gr8r
- https://github.com/ClickHouse/ClickHouse/blob/bd17ee769e337906c4b1f404861e042ad72fcbfc/src/Interpreters/executeQuery.cpp#L1013-L1015
- https://github.com/ClickHouse/ClickHouse/pull/58611
- https://github.com/ClickHouse/ClickHouse/security/advisories/GHSA-45h5-f7g3-gr8r
Get alerted when CVE-2024-22412 or the next vulnerability affects your stack