← MCP server and skill grades

Memori

MemoriLabs/Memori

C
Type
Skill
Scanned
Nov 17, 2026
Version
574b1ea3e876
Files read
658

Memori is a memory toolkit and plugin suite for AI coding assistants that records your chats and tool activity so the AI can remember context across sessions. The biggest risk is that its plugins pass chat text into unrestricted terminal commands, install software in a shared temporary folder, and load files from the current folder, allowing untrusted content or projects to run unwanted code or leak your API keys.

What it can reach

Network
Sends your conversations, summaries, and tool activity to Memori Cloud (api.memorilabs.ai and collector.memorilabs.ai), connects to configured AI providers and cloud databases (including TiDB Cloud Zero and CockroachDB), and downloads AI models and runtime software from Hugging Face, GitHub, SourceForge, and Maven Central.
Files
Reads .env settings and native code libraries from the current folder, reads and writes local SQLite databases and agent configuration files (under ~/.memori, ~/.openclaw, ~/.hermes, and .claude), and saves downloaded models and temporary packages on disk.
Shell commands
Requests unrestricted terminal access in Claude Code to run scripts on nearly every chat turn, runs shell commands to install npm packages and run the Memori command-line tool for account setup and quota checks, and runs a basic check on Linux to detect system libraries.
Secrets
Reads Memori, AI provider, and database keys and login credentials from environment variables, .env files, and local agent settings files, and captures prompts, responses, and tool data passing through your AI assistant.
Other
Creates tables and stores or retrieves conversation history, extracted facts, and search data in user-configured databases such as PostgreSQL, MySQL, MariaDB, TiDB, CockroachDB, Oracle, OceanBase, and MongoDB.

Findings

1 high5 medium
  1. HighOpenClaw signup tool installs npm packages into shared temp directory and runs shell commands

    integrations/openclaw/src/tools/memori-signup.ts:51

    The memori_signup tool is registered unconditionally even before the OpenClaw plugin is configured. Whenever it is called, it runs npm install directly inside os.tmpdir() (such as /tmp) via child_process.exec without creating a private subdirectory or disabling install scripts, and then runs the installed binary via another shell command (${binPath} sign-up ${params.email}). On a multi-user machine, another local user can pre-place a package.json or node_modules inside /tmp to execute arbitrary code. On Windows, child_process.exec runs cmd.exe, and because the email validation regex permits % and _, a prompt-injected agent passing %OPENAI_API_KEY%@attacker.com causes cmd.exe to expand secret environment variables and send them to the signup endpoint (which emails that address) or echo them back in tool output.

    Fix: Call the sdk/account HTTP endpoint directly through the already-bundled @memorilabs/memori SDK (as the Hermes integration does), or invoke the bundled CLI with execFile without runtime npm install or shell interpolation.

  2. MediumPython native loader executes shared libraries from relative current-working-directory paths first

    memori/native/_loader.py:57

    Before importing the installed memori_python extension from Python's site-packages, _try_import_memori_python() checks twelve relative paths under the current working directory (such as target/release/libmemori_python.so, target/debug/libmemori_python.dylib, and core/target/release/memori_python.dll) and loads the first match with ExtensionFileLoader. If a user runs a Memori-enabled agent, script, or CLI command inside an untrusted cloned repository or shared directory containing a file at one of those paths, arbitrary native code is executed immediately with the user's privileges.

    Fix: Import memori_python from installed packages first and remove relative working-directory search paths from default runtime behavior, gating local build paths behind an explicit developer opt-in variable.

  3. MediumLoading .env from the current working directory allows untrusted repos to hijack API endpoints and keys

    integrations/claude-code/index.ts:61

    When the Claude Code skill is installed globally (~/.claude/skills/memori/), it runs bun on nearly every user turn inside the active repository. Because bun automatically loads .env from the current working directory before index.ts runs and index.ts only fills variables not already in process.env, a malicious .env file in an untrusted repository overrides ~/.claude/skills/memori/.env (redirecting recall and exfiltrating conversation turns and tool traces to an attacker's Memori account) or injects HTTPS_PROXY and NODE_TLS_REJECT_UNAUTHORIZED=0 to intercept the user's MEMORI_API_KEY. Similarly, memori-ts/src/bin/cli.ts (spawned by OpenClaw's memori_quota tool) and memori/__main__.py load all unset variables from cwd/.env, allowing MEMORI_API_URL_BASE in an untrusted .env to redirect requests carrying Authorization: Bearer MEMORI_API_KEY to an attacker-controlled server.

    Fix: Run bun with --no-env-file so only explicit environment variables or the skill's own .env file are used, and restrict CLI .env loading so untrusted working directories cannot override API base URLs or proxy/TLS variables.

  4. MediumClaude Code skill grants unscoped Bash access and interpolates messages into double-quoted shell commands

    integrations/claude-code/SKILL.md:19

    The skill frontmatter declares allowed-tools: Bash without scoping it to the Memori CLI script, and its README troubleshooting section instructs users to add Bash(bun *) to settings.local.json or settings.json. Because the skill triggers on nearly every turn and bun is a full JavaScript runtime, unscoped Bash or Bash(bun *) allows a prompt-injected agent to run arbitrary code (such as bun -e) without user confirmation. The skill also instructs the agent to pass user messages, assistant responses, and tool traces inside double-quoted Bash arguments (--userMessage "$USER_MESSAGE"), where unescaped backticks or $() subshells are evaluated by Bash.

    Fix: Scope allowed-tools and any recommended permission rule to Bash(bun .claude/skills/memori/index.ts *), and pass advanced-augmentation payloads as JSON over standard input instead of double-quoted shell arguments.

  5. MediumBYODB self-hosted mode transmits conversation messages to Memori Cloud by default

    core/src/augmentation/pipeline.rs:31

    When a user initializes Memori with their own database connection (BYODB mode) and no MEMORI_API_KEY, background Advanced Augmentation is still enabled automatically in both the Python and TypeScript SDKs with no constructor flag to disable it. After every attributed LLM call, the Rust engine (and Python fallback) sends the conversation messages to https://api.memorilabs.ai/v1/sdk/augmentation using a hardcoded public API key, contradicting the BYODB documentation's claim that all data stays on the user's own infrastructure with no third-party storage.

    Fix: Add an explicit configuration flag to disable external augmentation in BYODB mode (or require opt-in before transmitting conversations to api.memorilabs.ai) and clearly disclose the cloud augmentation call in BYODB documentation.

  6. MediumEmpty projectId parameter in OpenClaw recall tools bypasses project memory isolation

    integrations/openclaw/src/tools/memori-recall.ts:82

    Both memori_recall and memori_recall_summary build request parameters with { projectId: config.projectId, ...params }, while the projectId schema description instructs the model to 'Leave this EMPTY to use the configured default project.' When the model passes projectId: "" (following that instruction) or an explicit undefined property, it overwrites config.projectId, causing buildQueryString to omit project_id from the API query and return memories across all projects for the entity without needing to know any project names.

    Fix: Ignore empty or undefined parameter values before applying config.projectId (for example, const projectId = params.projectId?.trim() || config.projectId), matching the Hermes integration.