# Leaked Mem0 API Key? Revoke It and Check Memory Access

> Mem0 API key exposed in an agent's config or repo? Delete it, check memory reads and writes, and assess the personal data stored behind it.

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

---

[LeakWatch](/)

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

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

AI · Secret guide

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

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

A Mem0 API key authenticates an application to Mem0, the memory layer used by AI agents to store and recall facts about users and conversations. Whoever holds the key can read the memories stored under the project, and depending on its permissions, add or delete them. Those memories often contain personal details that end users shared with an assistant, which makes a leaked key a privacy problem as well as a billing one. Rotate the key first, then check what was read.

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

Provider

Mem0

Severity

High

Impact

SaaS account access and billing

Checked live by LeakWatch

No

## What a Mem0 API Key looks like

Mem0 platform API keys start with `m0-`, followed by a block of letters and digits. The value is a single string:

```text
m0-…   Mem0 API key (masked)
```

The prefix is what makes the value recognizable, but the detection also looks for a label such as `MEM0_API_KEY` or a configuration entry named after Mem0. Keys are usually stored in an environment variable for a Python or JavaScript agent, which is where most leaks begin. If you run self-hosted Mem0 instead of the hosted platform, the key may be a different value, so confirm which service issued the one you found before you act.

## How Mem0 API Keys get leaked

-   **Environment files.** A `.env` file with `MEM0_API_KEY` set to the real value, committed because `.gitignore` did not cover it.
-   **Notebooks.** A key typed into a notebook cell during an experiment, saved with the notebook and published with it.
-   **Agent configuration.** A prompt or tool configuration file that includes the key, copied between projects.
-   **Shared examples.** A snippet pasted into a support thread or a blog post to show how to store a memory, with the real key left in.
-   **Browser code.** A key placed in a front-end script for a demo, where anyone can read it.

## What to do in the first hour

1.  **Revoke the key.** Open the account settings for your Mem0 project, locate the API key and delete it. Do this before you change the code, so the value stops working straight away.
2.  **Create a replacement** and store it in your secret manager. Give each agent or service its own key, so the next leak affects one component.
3.  **Check reads and writes.** Review recent memory activity for the project since the exposure date. Look for reads from unfamiliar sources and for bulk exports.
4.  **Assess the data.** Decide what kinds of personal information the memories hold. If the data includes personal details of end users, your privacy obligations may apply, and you should take advice on whether notification is required in your jurisdiction.
5.  **Check the other keys** in the same environment. An agent that holds a memory key often holds a model provider key too. Rotate those as well. See [I accidentally pushed an API key to GitHub](/blog/i-accidentally-pushed-an-api-key-to-github) for the order of steps.
6.  **Clean the repository.** Read the key from an environment variable, add the environment file to `.gitignore`, and remove the value from current files.

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

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

## Revoke it at Mem0

API keys are listed in the Mem0 dashboard for your project. Open account settings, go to the API keys section, find the key by its name and delete it, or create a new one and then remove the old one. Deleting the key stops it working for new requests. We have not confirmed the exact labels or whether every plan shows the same screen, so follow what the dashboard displays.

## How LeakWatch detects it

The rule is called Mem0 API Key. It looks for the word “mem0” followed, within a short distance, by an assignment-style separator and a value that begins with `m0-` and has between 24 and 44 letters or digits. The label is required, so a bare `m0-` value with no Mem0 context is not reported. The severity is **high**, with the impact class for SaaS tools. This type is not checked live: LeakWatch does not send a request to Mem0 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

Are memories stored by Mem0 public if the key leaks?

Not public, but readable by anyone who holds a valid key for that project. The leak exposes whatever the project stored, so the key matters as much as the data.

Can the key be used to create memories?

Possibly, depending on its permissions. Check the key’s scope in the dashboard. A key that can write can also plant false memories that an agent will later act on.

Should I use one project for each environment?

Yes. Keeping development and production separate limits what a leaked development key can reach, and makes a cleanup easier.

## Related

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

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