# Leaked Cursor API Key? Revoke It and Check Agents

> Cursor API key exposed in a repo or config? Revoke it, check background agents and usage data, then rotate team keys. Step-by-step guide.

Source: https://leakwatch.net/secrets/cursor-api-key

---

[LeakWatch](/)

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

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

AI · Secret guide

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

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

A Cursor API key gives access to Cursor’s programmatic interfaces for a team, such as the Admin API and the background agents that can run against your repositories. Whoever holds it may be able to start agents that read and write code in the repositories the key can reach, and to read usage data for the team. The damage depends on the permissions the key was created with, which is why checking those permissions is part of the response. Revoke the key first, then look at what it was used to do.

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

Provider

Cursor

Severity

High

Impact

SaaS account access and billing

Checked live by LeakWatch

No

## What a Cursor API Key looks like

The format of Cursor’s keys is not something this guide can state with confidence. The rule in LeakWatch looks for a value starting with `key_`, followed by 64 lowercase hexadecimal characters, and only when the word `cursor` appears just before it. Some third-party documentation describes a different prefix, `crsr_`, so the shape you see in your own account may differ from the one the rule expects. Check your own dashboard to confirm what a key looks like before you rely on a match or a non-match.

```text
key_…XXXX   value shape the rule matches, masked
crsr_…XXXX  prefix described by some third-party sources (masked)
```

The name of the variable matters for detection. A value on its own, without the word Cursor near it, is not reported. That is intentional, because a 64-character hexadecimal string is common in many systems, and it would generate a great deal of noise. Treat any Cursor key you find in a file, a log or a configuration as exposed, even when the rule does not report it.

## How Cursor API Keys get leaked

-   **Team configuration committed to a repository.** A file that stores the admin key so that a dashboard script can run, pushed to a repository that is then shared more widely than intended.
-   **Automation scripts and CI.** A pipeline that exports the key to read usage data, with the value echoed in a log when a step fails.
-   **Local editor and tool configuration.** A settings file that holds the key for a scripting tool, copied into a dotfiles repository.
-   **Shared snippets.** A key pasted into a chat, a support ticket or a pull request description when a call to the API returned an error.
-   **Screenshots.** A dashboard screenshot shared to show a setting, with the key partly or fully visible.

## What to do in the first hour

1.  **Revoke the key.** Open the account settings in your Cursor dashboard, find the key in the list of keys for your team, and delete it. Do this before you clean the files, since the key keeps working until it is deleted.
2.  **Create a replacement** for each integration that still needs one. Keep the permission level as low as the integration allows, and give each script or service its own key.
3.  **Review background agents.** Look at the agents that ran in the period since the exposure. Check which repositories they touched, whether they opened pull requests, and whether any of their changes were merged.
4.  **Check repository activity.** Review commits and pull requests in the repositories the key could reach. Look for changes you did not expect, especially in build and deployment files.
5.  **Review usage.** Look at the team’s usage data for unusual activity or a spike in requests since the exposure.
6.  **Look at the rest of the file.** Revoke other credentials stored next to the Cursor key, such as repository tokens and cloud keys.
7.  **Clean the repository.** Remove the value from current files and from any shared configuration, add the file to `.gitignore`, and rewrite history if the repository was public. See [I accidentally pushed an API key to GitHub](/blog/i-accidentally-pushed-an-api-key-to-github) for the full order.

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 Cursor

Team keys are managed from the Cursor dashboard, in the settings area for your team. Sources we reviewed disagree on the exact path, and the interface has changed over time, so do not follow an older screenshot. Look for a section named for API keys or admin API keys, and delete the one that leaked. Keys are normally shown only once, when they are created, so store the replacement straight away. Creating a key generally requires an admin or owner role on the team, so a team member who is not an admin may need to ask one to revoke it. If the key you need is not listed, check whether it belongs to a different team or was created by a service account.

## How LeakWatch detects it

The rule is called “Cursor API Key”. It looks for the word `cursor`, followed by a short run of characters and an assignment sign or similar separator, then a value that starts with `key_` and continues with exactly 64 lowercase hexadecimal characters. The word requirement is what keeps the rule from reporting every hexadecimal string. The severity is **high**, with the SaaS impact class, because the key can start agents and read team data. **This type is not checked live**: LeakWatch does not send the value to Cursor, so a finding means the value and its name matched, not that the key still works. Keys in another shape, or without the word Cursor near them, are not reported by this rule.

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

If the rule did not flag my key, am I safe?

Not necessarily. The rule only matches one shape and needs the word Cursor nearby. If the key is in a file, a log or a message, treat it as exposed and check the dashboard for the key’s name and recent activity.

Can a leaked Cursor key read my source code?

Potentially, through agents or integrations that have access to the repositories the key can reach. Check which repositories were involved, since the answer depends on the permissions the key had.

How should I store the replacement?

In your CI secret store or a password manager, and only in the environment of the process that needs it. Avoid placing it in editor settings that are synced or committed.

## Related

-   [Anthropic (Claude) API Key](/secrets/anthropic-api-key)
-   [OpenAI API key](/secrets/openai-api-key)
-   [Gemini Specific Key](/secrets/gemini-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 Cursor.

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