# Leaked Weights & Biases API Key? Revoke It Today

> Weights & Biases API key exposed in a notebook or repo? Delete it in user settings, review runs and artifacts for changes, then rotate. Step-by-step guide.

Source: https://leakwatch.net/secrets/weights-biases-api-key

---

[LeakWatch](/)

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

1.  [Home](/)
2.  [Secrets](/secrets)
3.  Weights & Biases API key

AI · Secret guide

# Leaked Weights & Biases API key: what to do in the first hour

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

A Weights & Biases API key lets whoever holds it act as the user who created it on the W&B platform. That covers experiments, logged metrics, artifacts and model files for every project the user can reach, and in some setups team projects too. Model artifacts are valuable intellectual property, and a changed artifact can quietly affect models that other people load. Revoke the key first, then check what was read or altered.

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

Provider

Weights & Biases

Severity

High

Impact

SaaS account access and billing

Checked live by LeakWatch

No

## What a Weights & Biases API key looks like

Current Weights & Biases keys start with `wandb_v1_`, followed by a long run of letters, digits, underscores and hyphens. Older keys have a different, shorter format that the rule does not match. The `wandb_v1_` prefix is distinctive, so the value is easy to spot once you know what to look for:

```text
wandb_v1_…XXXX   Weights & Biases API key (masked)
```

The key is used by the W&B command-line tool and the Python client, which read it from an environment variable named `WANDB_API_KEY` or from a local credentials file. Both places are where keys are usually found when they leak.

## How Weights & Biases API keys get leaked

-   **Training scripts committed to a repository.** A script that calls `wandb.login` with the key written inline, pushed with the project.
-   **Notebooks.** A key typed into a notebook cell, saved with the notebook and shared on a platform, in a course or in a paper’s supplementary material.
-   **Local credentials files.** The file the client writes after login, copied into a dotfiles repository or a backup.
-   **Container images and cloud jobs.** A key baked into an image or a job definition that is then pushed to a shared registry.
-   **Logs.** A training job that prints its environment, or an error report that includes the configuration.

## What to do in the first hour

1.  **Delete the key.** Open the account settings, go to the API keys section of your user settings, and delete the key that leaked. Deleting it stops every script that uses it, so have the replacement ready if a job is running.
2.  **Create a new key** and store it in your CI secret store or a local credentials manager, not in code.
3.  **Review the runs and artifacts.** Check the projects the user can reach for runs, artifacts and model versions created or changed since the exposure. Pay attention to model artifacts that other people load.
4.  **Check the team.** If the key belonged to someone with access to team projects, review the team membership and the access settings.
5.  **Check other secrets.** Rotate any cloud or registry credential that was stored alongside the key.
6.  **Clean the repository and logs.** Remove the value from code, notebooks and history. 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 project? [Run a free scan](/).

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

## Revoke it at Weights & Biases

Open the account settings on Weights & Biases, go to the user settings page, find the API keys section, and delete the key that leaked. The official W&B user settings documentation describes this section and the steps for creating and deleting keys. Deleting a key takes effect at once, so update your systems first where you can. Organization administrators can also restrict which members create keys, which is worth checking for your team.

## How LeakWatch detects it

The rule is called “Weights & Biases API Key”. It looks for the prefix `wandb_v1_` followed by 77 letters, digits, underscores or hyphens, with word boundaries around the value. No surrounding text is needed. The severity is **high**. **This type is not checked live**: LeakWatch does not call Weights & Biases with the value it finds, so a hit tells you the key was present, not whether it still works.

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

Does an old-format key matter?

Yes. This rule only matches the current format, so older keys need a manual search. Treat them with the same care.

Will my training jobs stop?

Jobs that use the deleted key will fail at login. Replace the key in the job configuration before you delete the old one if the job cannot wait.

Is the key the same as my login password?

No. The key is a separate credential for scripts and tools. Changing your password does not revoke it, so delete the key explicitly.

## Related

-   [Hugging Face Access Token](/secrets/huggingface-access-token)
-   [Mistral API Key](/secrets/mistral-api-key)
-   [Cohere API Token](/secrets/cohere-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 Weights & Biases.

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