CVE-2024-23689
High · 8.8CVSS
8.8
EPSS
0.7%
Published
Jan 19, 2024
CISA due date
—
Cloudanix analysis
Some ClickHouse Java database software could accidentally write a certificate password into logs, allowing anyone with log access to steal database credentials.
- Exploitation
- Remote Authenticated
- Attacker needs
- Low Privilege
- Complexity
- Low
- Impact
- Other
- Component
- Library
- Class
- Information Disclosure
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Affected ClickHouse Java components, including clickhouse-r2dbc, com.clickhouse:clickhouse-jdbc, and com.clickhouse:clickhouse-client before 0.4.6, can include the client certificate password in exception text when TLS client-certificate configuration uses the sslkey option and a ClickHouseException, SQLException, or related database operation error is thrown. The flaw is an information disclosure issue in error handling and logging: sensitive authentication material that should remain in memory or protected configuration can be written to application logs, centralized log platforms, crash reports, monitoring systems, or support bundles. If an attacker can both trigger relevant failures and access the resulting logs, they may recover the certificate password and potentially use it with associated certificate/private-key material to authenticate to ClickHouse or related services.
Why it matters to the business
This issue can expose database client credential material through normal operational logs, turning routine application errors into a credential-leak path. If logs are broadly accessible, exported to third-party observability tooling, or retained for long periods, the exposure window may be significant. Compromise of ClickHouse client certificate passwords can lead to unauthorized database access, data theft, data tampering, service disruption, and costly credential/certificate rotation. Although it is not listed in CISA KEV and the EPSS score is currently low, exploit code is available and the vulnerability has been public since 2024-01-19, so affected deployments should be treated as overdue for remediation.
How an attack unfolds
An attacker first identifies an application or service that uses a vulnerable ClickHouse Java driver/client version with TLS client-certificate settings that include sslkey. The attacker then causes a database operation to fail, for example by submitting input that results in an invalid query, malformed parameter, failed connection, timeout, authentication error, or other condition that causes the ClickHouse client to throw a ClickHouseException or SQLException. The application or framework logs the exception message, and the vulnerable client includes the client certificate password in that message. The attacker then obtains the logs through application log access, a compromised low-privileged account, exposed log aggregation tooling, support bundle access, container logs, CI/CD job output, or another log-read path. With the leaked password, the attacker attempts to decrypt or use the corresponding client key/certificate if available, then connects to ClickHouse or pivots through services that trust that certificate, potentially reading, modifying, or disrupting data depending on the privileges assigned to that client identity.
How to fix it
Upgrade all affected ClickHouse Java dependencies to version 0.4.6 or later. For source-based builds, include the upstream fix commit dd91e1776b94a30e32fecf9c82354685295169a6 or a later commit containing the fix. Review Maven, Gradle, shaded JARs, application server libraries, container images, and transitive dependencies for com.clickhouse:clickhouse-jdbc, com.clickhouse:clickhouse-client, and clickhouse-r2dbc versions below 0.4.6. After upgrading, rotate any client certificate passwords, private keys, and certificates that may have been present in logs, and invalidate old credentials where possible. Remove sensitive historical logs or restrict their access according to retention and legal requirements. Add log redaction for sslkey-related parameters, certificate passwords, private-key passphrases, JDBC URLs, and database connection properties. Restrict log access to least privilege and avoid sending sensitive exception payloads to third-party systems unless protected by appropriate access controls and retention limits.
How to confirm the fix worked
Confirm dependency versions with build tooling such as mvn dependency:tree, gradle dependencies, software composition analysis, or SBOM inspection, and verify that no deployed artifact contains ClickHouse Java client, JDBC, or R2DBC components below 0.4.6. For source builds, verify that commit dd91e1776b94a30e32fecf9c82354685295169a6 or a later fixed revision is present. In a non-production test environment, configure a ClickHouse connection using equivalent TLS client-certificate settings and intentionally trigger a connection or query exception; the resulting exception message and logs must not contain the certificate password, sslkey secret material, private-key passphrase, or full sensitive connection string. Search current and historical logs for leaked values and verify that log redaction rules remove sensitive connection properties. Validate that certificate/key rotation completed by confirming old credentials no longer authenticate and updated applications continue to connect successfully.
Typical attack path
- Find an application using vulnerable ClickHouse Java components: clickhouse-r2dbc, com.clickhouse:clickhouse-jdbc, or com.clickhouse:clickhouse-client before 0.4.6.
- Confirm the application uses TLS client-certificate configuration involving sslkey and a protected client key.
- Trigger a database exception through malformed input, invalid query behavior, failed connection conditions, or other controllable error paths.
- Wait for the application, framework, container runtime, or observability agent to log the thrown ClickHouseException, SQLException, or related stack trace.
- Access application logs, centralized log storage, support bundles, CI/CD logs, or monitoring output that contains the exception text.
- Extract the exposed client certificate password from the logged exception message.
- Use the password with any obtainable client key/certificate material to authenticate to ClickHouse or impersonate the affected client identity.
- Perform unauthorized data access, modification, deletion, or lateral movement according to the privileges granted to that certificate identity.
How to detect it
To determine whether this was already exploited or resulted in credential exposure, review application logs, container stdout/stderr, Java exception logs, centralized SIEM/log aggregation data, APM traces, crash reports, support bundles, CI/CD job output, and incident/debug logs for ClickHouse exceptions that include connection properties or TLS key settings. Focus on time periods when applications used ClickHouse Java client, JDBC, or R2DBC versions below 0.4.6 and had sslkey configured. Search for ClickHouseException or SQLException stack traces near sslkey, certificate, private-key, passphrase, password, or JDBC URL fields. Investigate whether users or service accounts accessed log records containing these secrets, including downloads, exports, dashboard views, support bundle retrievals, or API queries against log platforms. Correlate any suspected leak time with ClickHouse authentication logs, query logs, and network telemetry for unusual use of the affected certificate identity, new source IPs, abnormal query volume, data export behavior, failed authentication attempts, schema changes, or destructive operations. Because this vulnerability leaks secrets through logs rather than producing a unique network exploit signature, the strongest evidence is the presence of sensitive sslkey/certificate password material in exception logs followed by suspicious access to those logs or unusual database activity using the same client identity.
- com.clickhouse.client.ClickHouseException
- java.sql.SQLException
- ClickHouseException
- SQLException
- sslkey=
- sslkey:
- sslcert=
- sslrootcert=
- client certificate password
- certificate password
- private key password
- key password
- passphrase
- jdbc:clickhouse://
- clickhouse-jdbc
- clickhouse-client
- clickhouse-r2dbc
- com.clickhouse:clickhouse-jdbc
- com.clickhouse:clickhouse-client
What your security team should do
- Prioritize upgrade of all ClickHouse Java client, JDBC, and R2DBC components below 0.4.6, especially internet-facing applications, multi-tenant services, and systems whose logs are accessible to developers, support users, or third-party platforms.
- Immediately search application, container, database access, CI/CD, and centralized logging systems for ClickHouse exceptions containing sslkey-related connection properties or certificate password values.
- Rotate any client certificate passwords, private keys, and certificates that may have appeared in logs; treat exposed secrets as compromised rather than merely mislogged.
- Restrict access to historical logs and support bundles until searches and cleanup are complete.
- Implement log redaction for JDBC URLs, ClickHouse connection properties, sslkey values, certificate passphrases, and generic password-like fields.
- Review ClickHouse permissions for affected client identities and reduce privileges to the minimum required to limit impact if credentials were exposed.
- Add dependency/SBOM policy gates to prevent introduction of com.clickhouse ClickHouse Java artifacts below 0.4.6.
- Monitor for suspicious ClickHouse authentications or queries using certificate identities associated with vulnerable applications, especially after logged exception spikes.
The record
Exposure of sensitive information in exceptions in ClichHouse's clickhouse-r2dbc, com.clickhouse:clickhouse-jdbc, and com.clickhouse:clickhouse-client versions less than 0.4.6 allows unauthorized users to gain access to client certificate passwords via client exception logs. This occurs when 'sslkey' is specified and an exception, such as a ClickHouseException or SQLException, is thrown during database operations; the certificate password is then included in the logged exception message.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Maven | com.clickhouse:clickhouse-client | 0 | 0.4.6 |
| Maven | com.clickhouse:clickhouse-jdbc | 0 | 0.4.6 |
| Maven | com.clickhouse:clickhouse-r2dbc | 0 | 0.4.6 |
Related vulnerabilities
- CVE-2026-62979 jack lets users share media libraries through their Radarr/Sonarr stack, peer-to-peer. CWE-209
- CVE-2026-118643 n8n before 1.123.85, 2.x before 2.43.5, and 2.44.x before 2.44.1 stores credential… CWE-209
- CVE-2026-67080 HCL BigFix AEX is affected by an Information Disclosure vulnerability due to improper… CWE-209
- CVE-2026-118272 A vulnerability was detected in a2ui-project a2ui up to 0.10.6. CWE-209
- CVE-2026-108316 Tanium addressed an information disclosure vulnerability in Tanium Server. CWE-209
- CVE-2026-116478 A vulnerability was detected in a2aproject a2a-go up to 2.4.0. CWE-209
- CVE-2026-116479 A flaw has been found in a2aproject a2a-java up to 1.2.0.Final. CWE-209
- CVE-2026-116477 A security vulnerability has been detected in a2aproject a2a-dotnet up to 1.0.0-preview2. CWE-209