# Leaked ClickHouse Cloud API Key? Delete It Now

> ClickHouse Cloud API key exposed on GitHub? Delete the key, rotate it, then check services and billing for abuse. Step-by-step guide.

Source: https://leakwatch.net/secrets/clickhouse-cloud-api-key

---

[LeakWatch](/)

[Product](/product)[Live feed](/leaks)[Guides](/secrets)[Blog](/blog)[Free scan](/)

1.  [Home](/)
2.  [Secrets](/secrets)
3.  ClickHouse Cloud API Key

Databases & keys · Secret guide

# Leaked ClickHouse Cloud API Key: what to do in the first hour

Critical severityDetected onlyLast verified October 30, 2026 · 4 min read

A ClickHouse Cloud API key is made to drive the control plane of your organization through the Cloud API: listing, creating, changing and deleting services, and managing other settings, according to the role given to the key. A key with a broad role can start expensive services, delete production ones or read configuration, which is a threat to both your data and your invoice. The key is a pair: a key ID and a key secret. Delete the key first, then investigate what it did.

[Check your GitHub account for leaked secrets — free](/)

Provider

ClickHouse Cloud

Severity

Critical

Impact

SaaS account access and billing

Checked live by LeakWatch

No

## What a ClickHouse Cloud API Key looks like

The Cloud API uses basic authentication with the key ID as the user name and the key secret as the password. The key ID is the visible, recognizable half: the four characters `4b1d` followed by 38 letters and digits, 42 characters in all:

```text
4b1dXXXX…   ClickHouse key ID (masked: 4b1d + 38 alphanumeric characters)
```

It typically appears in variables such as `CLICKHOUSE_API_KEY` or `CLICKHOUSE_KEY_ID`, next to a matching secret variable, or in a `curl -u` command or a Terraform provider block. Do not mix it up with database users: the password of a SQL user on one service is a different credential, covered in the [database connection string guide](/secrets/database-connection-string). Only the key ID is recognizable by its shape. The secret half has no fixed prefix, so if the ID leaked, assume the file holding it also holds the secret.

## How ClickHouse Cloud API Keys get leaked

-   **Infrastructure as code.** The provider configuration of a Terraform or Pulumi project with the key ID and secret committed in a variables file.
-   **Automation scripts.** A script that scales or creates services, with the key written into the call.
-   **Environment files.** `CLICKHOUSE_API_KEY` and its secret in a `.env` or compose file added to a repository.
-   **CI pipelines.** A deployment job that prints the credentials, or that keeps them in a public pipeline file.
-   **Shared commands.** A `curl -u` example pasted into an issue, a ticket or a chat.

## What to do in the first hour

1.  **Open the API keys list** of your ClickHouse Cloud organization (see the link below) and find the exposed key by its ID. Note its role and creation date.
2.  **Create a replacement key** with the lowest role that your automation needs, and an expiry date if the console offers one.
3.  **Deploy the new key** and its secret to your pipeline or secret store, and run one harmless call to confirm that it works.
4.  **Delete the exposed key.** The key list in the organization settings lets you remove it, and the Cloud API has a delete-key endpoint, which refuses to delete the key authenticating that same request. Then retry a call with the old key to confirm it is rejected.
5.  **Review your services.** Look for services you did not create, changed sizes, new IP access rules, new SQL users or changed settings. Compare with your records or infrastructure code.
6.  **Check the activity and billing.** Look at the organization activity log if it is available on your plan, and at usage and cost for the period since the exposure.
7.  **Rotate what the key could reach.** If it could create users or read configuration, change the passwords of the database users on the services. Then clean the code. See [I accidentally pushed an API key to GitHub](/blog/i-accidentally-pushed-an-api-key-to-github).

Not sure what else leaked from the same repository? [Run a free scan](/).

[Not sure what else leaked? Run a free scan.](/)

## Revoke it at ClickHouse

ClickHouse Cloud API keys are managed in the settings of your ClickHouse Cloud organization, after you sign in with a user allowed to administer it. Open the page that lists API keys, select the exposed key and delete it. Deletion is final. A person has not confirmed the exact menu wording for this guide, and the interface can change, so if what you see differs, look for the section where API keys are created and listed, and follow ClickHouse’s documentation.

## How LeakWatch detects it

The rule is called ClickHouse Cloud API Key. It recognizes the literal prefix `4b1d` followed by exactly 38 letters and digits, with a word boundary on both sides. The prefix is case sensitive: `4B1D` does not match. A body that is one character too short or too long is not reported, and neither is a string with more characters attached. It does not need a variable name next to it, so the shape alone triggers it, and because the prefix is short, an unrelated string of the right shape can occasionally match. The severity is **critical**. This type is not checked live: LeakWatch does not send any request to ClickHouse with the value it found.

LeakWatch detects this format but does **not** check it live: it can tell you the key is exposed, not whether it still works. Assume it does until you have revoked it.

## FAQ

Is the key ID alone enough to use the API?

No, the API also needs the secret. But the two are normally stored together, so treat the key as compromised and delete it.

Does deleting the key delete my services?

No. It only removes the key’s access. Your services and their data stay as they are.

Do I need to change the passwords of my databases?

Only if the key’s role could have created users or read their configuration, or if the same file held those passwords. When in doubt, rotate them.

## Related

-   [Confluent Access Token](/secrets/confluent-api-key)
-   [Database Connection String](/secrets/database-connection-string)
-   [Databricks API Token](/secrets/databricks-api-token)
-   [I accidentally pushed an API key to GitHub](/blog/i-accidentally-pushed-an-api-key-to-github)
-   [Which vendors leak most this week](/leaks/trends)
-   [All secret guides](/secrets)

[Get alerted next time a secret leaks — create a free account](/)

LeakWatch is not affiliated with ClickHouse Cloud.

![Gabriel Diyan, founder of LeakWatch](/brand/Photo-Gabriel-Diyan.webp)

Gabriel Diyan (0xCr0c0)

Cybersecurity student, founder of LeakWatch. I built and run the scanner described here — the detection patterns, the false-positive classifier and the provider validators are mine. [More about who I am](/about).

[GitHub](https://github.com/Leakwatch-Scan) · [X](https://x.com/LeakwatchScan) · [LinkedIn](https://www.linkedin.com/in/gabriel-diyan-80a378375) · [GitHub (personal)](https://github.com/crocogab)

LeakWatch

Secrets leak into public commits every minute. This watches the forges for yours. Built and run by [Gabriel Diyan](/about), a cybersecurity student — [why LeakWatch exists](/about).

Scan

-   [Product](/product)
-   [Live feed](/leaks)
-   [Trends](/leaks/trends)
-   [API docs](/docs)
-   [CI/CD](/docs?tab=ci)

Read

-   [Blog](/blog)
-   [Secret guides](/secrets)
-   [Changelog](/changelog)
-   [About](/about)

Verify

-   [Security](/security)
-   [Privacy](/privacy)
-   [Terms](/terms)
-   [Legal](/legal)
-   [Contact](/contact)
-   [Status](https://status.leakwatch.net)

© 2026 LeakWatch

[GitHub](https://github.com/Leakwatch-Scan)[X](https://x.com/LeakwatchScan)
