# Leaked Langfuse Secret Key? Delete It and Check Traces

> Langfuse secret key exposed? Delete it in project settings, create a replacement, and review traces for data you did not send. Step-by-step guide.

Source: https://leakwatch.net/secrets/langfuse-secret-key

---

[LeakWatch](/)

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

1.  [Home](/)
2.  [Secrets](/secrets)
3.  Langfuse Secret Key

AI · Secret guide

# Leaked Langfuse Secret Key: what to do in the first hour

High severityDetected onlyLast verified November 5, 2026 · 5 min read

A Langfuse secret key is half of the key pair that your application uses to send traces, prompts and evaluation data to Langfuse, the open-source observability platform for language model applications. The public key is paired with it, and the secret key is the part that must stay private. Whoever holds the secret can read the traces of the project, which often include user inputs, model outputs, prompt templates and internal tool results. A leak can therefore expose far more than the key itself, and it deserves quick action.

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

Provider

Langfuse

Severity

High

Impact

SaaS account access and billing

Checked live by LeakWatch

No

## What a Langfuse secret key looks like

Langfuse secret keys begin with `sk-lf-`, followed by a UUID-style value made of groups of hexadecimal characters separated by hyphens. Public keys use the `pk-lf-` prefix instead, and they are meant to be visible in client code. Only the secret key is sensitive:

```text
sk-lf-XXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX   (secret key, masked)
pk-lf-…                                    (public key, not secret)
```

The secret key is usually stored in an environment variable named after the Langfuse host and project, next to the public key and the host address. It is shown in full only when it is created, so a value you find in a file was copied from a settings page at some point. Keys belong to a project, so the same key works for every service that uses that project.

## How Langfuse secret keys get leaked

-   **Environment files.** A `.env` file with the secret key, committed to a repository because the ignore rules did not cover it.
-   **Front-end code.** A secret key placed in a browser application. The public key may be exposed by design, but the secret key must stay on the server, and anyone who can open the page can read a value that is bundled into it.
-   **Notebooks and scripts.** A research notebook that sends traces from a laptop, with the key typed into a cell and saved when the notebook is shared.
-   **Container images.** A build that copies the configuration into an image, which is then pushed to a registry.
-   **Shared examples.** A snippet posted in a tutorial, a forum or a bug report, with the real key left in place of the placeholder.

## What to do in the first hour

1.  **Delete the secret key.** Open the Langfuse project settings, go to the API keys section, and delete the key that was exposed. Deleting ends its use for new requests. Do this before you clean the repository. Make sure you are in the right project, because keys are scoped to one project.
2.  **Create a replacement pair** and store the new secret key in a secret manager or in your hosting provider’s environment settings. The secret is shown only once when it is created, so copy it at that moment.
3.  **Update the services** that send traces. Deploy the new value, and confirm that new traces appear in the project.
4.  **Review the traces.** Look at the trace history for the period since the key may have been exposed. Check for traces from sources you do not recognize, for unusual volumes, and for data that your application would not send, such as traces from an unknown environment name.
5.  **Check the other secrets** in the same file. Language model applications usually hold several keys, such as a model provider key and a database password. Rotate any that sat next to the Langfuse key.
6.  **Clean the repository** after the rotation: remove the value from the files, add the file to `.gitignore` and decide whether to rewrite history. The order of steps is in [I accidentally pushed an API key to GitHub](/blog/i-accidentally-pushed-an-api-key-to-github).

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

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

## Revoke it at Langfuse

Open the account settings for your Langfuse project and go to the settings section, then to the API keys list. Find the key pair that holds the leaked secret and delete it, then create a new pair. A third-party write-up describes creating new keys before deleting old ones, so that services can be switched first, and that is a sensible order either way. We could not confirm the exact labels from the official Langfuse documentation during this review, so check what the project settings show. Keys that are deleted cannot be restored.

## How LeakWatch detects it

The rule is called Langfuse Secret Key. It looks for the fixed `sk-lf-` prefix, followed by a value in the groups-of-hexadecimal-characters shape, in the form of eight, four, four, four and twelve characters separated by hyphens, and then a delimiter such as a quote, a space, a semicolon or the end of the line. Public keys with the `pk-lf-` prefix are not reported, since they are meant to be visible. The severity is **high**, with the impact class for SaaS services. **This type is not checked live**: LeakWatch does not send the key to Langfuse.

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 public key a problem too?

Less so. The public key is designed to appear in client-side code, and on its own it cannot read traces. It is still good practice to replace it when you replace the secret, so the pair stays matched.

Will my application lose traces while I rotate?

Traces sent with the old key will fail once it is deleted. Create the replacement, deploy it, then delete the old key. If the leak is active, the short gap in traces is a fair price.

Should I look at prompts as well as traces?

Yes. Prompt templates and stored evaluations are part of the same project, so anyone with the secret key can read them. Check whether the prompts contain anything sensitive, such as internal instructions, and rotate any other credentials they mention.

## Related

-   [OpenAI API key](/secrets/openai-api-key)
-   [Anthropic (Claude) API Key](/secrets/anthropic-api-key)
-   [OpenRouter API Key](/secrets/openrouter-api-key)
-   [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 Langfuse.

![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)
