Back to skill

Security audit

Mem0 1.0.0

Security checks for vulnerabilities and agentic risk

Overview

This memory skill is mostly purpose-aligned, but it stores conversation-derived memories persistently, sends memory content and searches to OpenAI-backed services, and exposes broad user-selectable memory access and deletion controls.

Install only if you want this agent to maintain persistent conversational memory and are comfortable with memory text and search queries being processed through OpenAI. Avoid storing secrets or sensitive personal data, restrict who can invoke the scripts, remove or lock down the --user option, and add confirmation before bulk deletion.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T02 · Agent Memory Poisoning

Error
Location
scripts/mem0-add.js:26
Finding
Caller-Controlled User Identifiers Permit Cross-User Memory Poisoning, Disclosure, and Deletion## Vulnerability Details **File Location**: `scripts/mem0-add.js:26-29, 45-49`; `scripts/mem0-search.js:23-35`; `scripts/mem0-list.js:13-21`; `scripts/mem0-delete.js:22-41` **Vulnerability Type**: Missing authorization and insecure object ownership enforcement **Risk Level**: High ### Vulnerable Code `scripts/mem0-add.js:26-29, 45-49`: ```javascript if (arg.startsWith("--messages=")) { try { messages = JSON.parse(arg.substring(11)); } catch (e) { console.error("Error parsing messages JSON:", e.message); process.exit(1); } } else if (arg.startsWith("--user=")) { userId = arg.split("=")[1]; } else if (!arg.startsWith("--")) { text = arg; } let result; if (messages) { result = await memory.add(messages, { userId }); } else { result = await memory.add(text, { userId }); } ``` `scripts/mem0-search.js:23-35`: ```javascript for (const arg of args.slice(1)) { if (arg.startsWith("--limit=")) { limit = parseInt(arg.split("=")[1]); } else if (arg.startsWith("--user=")) { userId = arg.split("=")[1]; } } try { const memory = getMem0Instance(); const results = await memory.search(query, { userId, limit }); ``` `scripts/mem0-list.js:13-21`: ```javascript for (const arg of args) { if (arg.startsWith("--user=")) { userId = arg.split("=")[1]; } } try { const memory = getMem0Instance(); const response = await memory.getAll({ userId }); ``` `scripts/mem0-delete.js:22-41`: ```javascript for (const arg of args) { if (arg === "--all") { deleteAll = true; } else if (arg.startsWith("--user=")) { userId = arg.split("=")[1]; } else if (!arg.startsWith("--")) { memoryId = arg; } } try { const memory = getMem0Instance(); if (deleteAll) { await memory.deleteAll({ userId }); console.log(`✓ All memories deleted for user: ${userId}`); } else i ...[truncated 2794 chars]
Remediation
## Remediation Suggestions - Remove the caller-controlled `--user` option from normal Agent-facing commands. - Derive the user identifier from authenticated, trusted session context. - Enforce ownership checks inside the storage layer rather than relying only on CLI argument handling. - Scope individual deletion by both memory ID and authenticated owner. - Reject empty, malformed, unknown, or unauthorized user identifiers. - Maintain physically or cryptographically separated stores for different users where possible. - Require explicit confirmation or a separate privileged capability for bulk deletion. - Treat retrieved memory as untrusted data and prevent it from overriding system or developer instructions. - Record security audit events for memory creation, enumeration, and deletion without logging sensitive memory content. - Add tests proving that one authenticated user cannot add, read, search, or delete another user's records.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/mem0-config.js:19
Finding
Full Conversation Content and Search Queries Are Sent to an External Provider Without Enforced Consent or Redaction## Vulnerability Details **File Location**: `scripts/mem0-config.js:19-38`; `scripts/mem0-add.js:45-49`; `scripts/mem0-search.js:31-35` **Vulnerability Type**: Excessive external disclosure of potentially sensitive conversational data **Risk Level**: Medium ### Vulnerable Code `scripts/mem0-config.js:19-38`: ```javascript const config = { version: "v1.1", embedder: { provider: "openai", config: { apiKey: process.env.OPENAI_API_KEY || "", model: "text-embedding-3-small" } }, vectorStore: { provider: "memory", config: { collectionName: "clawdbot_memories", dimension: 1536 } }, llm: { provider: "openai", config: { apiKey: process.env.OPENAI_API_KEY || "", model: "gpt-4o-mini" // Fast, cost-effective for memory extraction } }, historyDbPath: HISTORY_DB, ...options }; ``` `scripts/mem0-add.js:45-49`: ```javascript let result; if (messages) { result = await memory.add(messages, { userId }); } else { result = await memory.add(text, { userId }); } ``` `scripts/mem0-search.js:31-35`: ```javascript const memory = getMem0Instance(); const results = await memory.search(query, { userId, limit }); ``` ### Technical Analysis The Skill configures both its LLM and embedding provider as OpenAI. Consequently, memory text, conversation-message arrays, and semantic search queries are passed to provider-backed Mem0 operations. External processing is functionally necessary for the selected OpenAI-based architecture. However, the implementation does not enforce data minimization before transmission. In particular, it has no: - Per-operation consent check. - Secret or credential detection. - Personal-data filtering or redaction. - Allowlist limiting which message fields may be stored. - Restriction against submitting complete assistant and user messages. - Local-p ...[truncated 1775 chars]
Remediation
## Remediation Suggestions - Require explicit user opt-in before storing conversational content or enabling automatic post-interaction storage. - Clearly disclose that memory text and search queries are processed by an external provider even when the vector store is described as local. - Extract a narrowly selected fact locally and request confirmation before transmitting it. - Never submit entire conversations when a minimal memory statement is sufficient. - Add secret scanning and redaction for API keys, passwords, tokens, private keys, authentication headers, and other credential patterns. - Add configurable personal-data filtering and field allowlists. - Provide a fully local LLM and embedding option for privacy-sensitive deployments. - Define retention and deletion policies for `~/.mem0/history.db`. - Create the Mem0 directory and database with restrictive owner-only filesystem permissions. - Add tests confirming that prohibited fields are removed before calls to `memory.add` and `memory.search`. - Fail safely when `OPENAI_API_KEY` is absent rather than initializing the provider with an empty string.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (38)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The skill is presented as a memory and retrieval aid, but it also exposes destructive administration commands that can delete one or all memories for a user. This mismatch is dangerous because users or orchestrators may activate the skill expecting only benign recall/storage behavior, while the skill also enables irreversible data loss operations not clearly framed in the high-level description.

Missing User Warnings

High
Confidence
96% confidence
Finding
The skill instructs automatic cross-conversation storage and recall of user preferences and context without a prominent warning about persistence, privacy, retention, or how data may be reused later. In the context of a memory system, this materially increases privacy risk because users may disclose information assuming it is ephemeral when it is actually retained and searched later.

Ae1

High
Category
analysis-evasion
Content
node scripts/mem0-search.js "user preferences" --limit=3
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/mem0-search.js "user preferences" --limit=3
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/mem0-search.js "user preferences" --limit=3
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/mem0-search.js "user preferences" --limit=3
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/mem0-add.js "Abhay prefers concise updates"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/mem0-add.js "Abhay prefers concise updates"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/mem0-add.js "Abhay prefers concise updates"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/mem0-add.js "Abhay prefers concise updates"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/mem0-add.js "Abhay prefers concise updates"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/mem0-list.js [--user=abhay]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/mem0-list.js [--user=abhay]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Known Vulnerable Dependency: brace-expansion==1.1.12 — 4 advisory(ies): CVE-2026-13149 (brace-expansion: DoS via exponential-time expansion of consecutive non-expanding); CVE-2026-33750 (brace-expansion: Zero-step sequence causes process hang and memory exhaustion); CVE-2026-14257 (brace-expansion: DoS via unbounded expansion length causing an out-of-memory pro) +1 more

High
Category
Supply Chain
Confidence
92% confidence
Finding
brace-expansion 1.1.12 is present and is associated with multiple denial-of-service issues involving pathological expansion patterns. Even as a transitive dependency, if attacker-controlled glob or pattern input reaches code using this library, it can trigger CPU or memory exhaustion.

Known Vulnerable Dependency: minimatch==3.1.2 — 3 advisory(ies): CVE-2026-27904 (minimatch ReDoS: nested *() extglobs generate catastrophically backtracking regu); CVE-2026-26996 (minimatch has a ReDoS via repeated wildcards with non-matching literal in patter); CVE-2026-27903 (minimatch has ReDoS: matchOne() combinatorial backtracking via multiple non-adja)

High
Category
Supply Chain
Confidence
93% confidence
Finding
minimatch 3.1.2 is a real vulnerable dependency with multiple ReDoS-style advisories. If any user-influenced glob patterns are processed, an attacker may cause excessive backtracking and degrade availability.

Known Vulnerable Dependency: axios==1.7.7 — 16 advisory(ies): CVE-2026-44494 (axios Vulnerable to Full Man-in-the-Middle via Prototype Pollution Gadget in `co); CVE-2026-44495 (axios Vulnerable to Credential Theft and Response Hijacking via Prototype Pollut); CVE-2025-62718 (Axios has a NO_PROXY Hostname Normalization Bypass that Leads to SSRF) +13 more

High
Category
Supply Chain
Confidence
95% confidence
Finding
axios 1.7.7 is a high-risk dependency in this skill because mem0 performs remote API and memory-service interactions, increasing exposure to SSRF, proxy bypass, redirect, or prototype-pollution-adjacent issues if untrusted URLs or config can flow into requests. Since this is a memory layer handling conversational data and external integrations, a vulnerable HTTP client materially raises risk.

Known Vulnerable Dependency: brace-expansion==2.0.2 — 4 advisory(ies): CVE-2026-13149 (brace-expansion: DoS via exponential-time expansion of consecutive non-expanding); CVE-2026-33750 (brace-expansion: Zero-step sequence causes process hang and memory exhaustion); CVE-2026-14257 (brace-expansion: DoS via unbounded expansion length causing an out-of-memory pro) +1 more

High
Category
Supply Chain
Confidence
91% confidence
Finding
brace-expansion 2.0.2 has the same class of DoS issues as the 1.x finding, and its presence means multiple vulnerable paths exist in the dependency graph. Repeated vulnerable pattern-processing libraries make resource exhaustion more plausible if any pattern-based functionality is exposed.

Known Vulnerable Dependency: form-data==4.0.5 — 1 advisory(ies): CVE-2026-12143 (form-data: CRLF injection in form-data via unescaped multipart field names and f)

High
Category
Supply Chain
Confidence
90% confidence
Finding
form-data 4.0.5 is flagged for CRLF injection in multipart field names and filenames, which can become dangerous if attacker-controlled metadata is included in outbound multipart requests. In an integration-heavy memory skill, malformed multipart construction could enable request smuggling or header manipulation against downstream services.

Possible Typosquatting: 'gaxios' resembles popular package 'axios'

High
Category
Supply Chain
Confidence
70% confidence
Finding
Package name closely resembles a popular package, suggesting possible typosquatting. Attackers publish malicious packages with similar names to trick developers into installing them.

Known Vulnerable Dependency: ip-address==10.1.0 — 2 advisory(ies): CVE-2026-69192 (ip-address: Address4 decodes leading-zero octets as decimal while resolvers deco); CVE-2026-42338 (ip-address has XSS in Address6 HTML-emitting methods)

High
Category
Supply Chain
Confidence
80% confidence
Finding
ip-address 10.1.0 is associated with parsing ambiguities and an HTML-emission XSS issue. This becomes more relevant if the package is used for SSRF protections, IP allow/deny decisions, or rendering diagnostic output, though the lockfile alone does not prove such use.

Known Vulnerable Dependency: langsmith==0.3.87 — 4 advisory(ies): CVE-2026-45134 (LangSmith SDK: Public prompt pull deserializes untrusted manifests without trust); CVE-2026-40190 (LangSmith Client SDKs has Prototype Pollution in langsmith-sdk via Incomplete `_); CVE-2026-41182 (LangSmith SDK: Streaming token events bypass output redaction) +1 more

High
Category
Supply Chain
Confidence
88% confidence
Finding
langsmith 0.3.87 is a concerning dependency in a conversational memory skill because the advisories include untrusted manifest handling, prototype pollution, and redaction bypass. Given the skill stores and searches conversational context, leakage or mishandling of prompts and memory content would be especially sensitive.

Known Vulnerable Dependency: minimatch==9.0.5 — 3 advisory(ies): CVE-2026-27904 (minimatch ReDoS: nested *() extglobs generate catastrophically backtracking regu); CVE-2026-26996 (minimatch has a ReDoS via repeated wildcards with non-matching literal in patter); CVE-2026-27903 (minimatch has ReDoS: matchOne() combinatorial backtracking via multiple non-adja)

High
Category
Supply Chain
Confidence
90% confidence
Finding
minimatch 9.0.5 is also flagged for ReDoS, indicating vulnerable pattern matching exists in more than one branch of the graph. If any feature accepts user-controlled globs or patterns, this can be used to consume CPU and degrade service availability.

Lp3

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding
The skill invokes scripts that rely on environment-provided secrets such as OPENAI_API_KEY, but the manifest does not declare any tool scope or permission boundary. That creates hidden capability and weakens reviewability, because an agent may access environment-backed resources without an explicit allowlist or user-visible declaration.

Vague Triggers

Medium
Confidence
92% confidence
Finding
The activation guidance says to use the skill not only when the user explicitly asks to remember something, but also when learning preferences or patterns during normal conversation. In a memory skill, that broad trigger makes silent collection of behavioral data more likely and expands persistence beyond what a user may reasonably expect.

Ssd 3

Medium
Confidence
94% confidence
Finding
Automatic storage of conversation-derived context across interactions creates a retention and secondary-use risk even if no classic secret is stored. Persisted natural-language memories can contain sensitive personal details, inferred traits, or context that later gets surfaced in unintended situations.

Static analysis

No suspicious patterns detected.