← MCP server and skill grades

memU

NevaMind-AI/memU

D
Type
Skill
Scanned
Nov 17, 2026
Version
e9af9af3caae
Files read
312

memU is a long-term memory tool for AI coding agents that mines past session logs into Markdown notes and skills and injects matching memories into future prompts. Its biggest risk is that its background memorization hooks silently launch headless agents with permission prompts and sandboxing disabled over raw session transcripts while also auto-updating agent instructions from remote servers without cryptographic verification.

What it can reach

Files
Reads conversation and tool logs from Claude Code, Claude Cowork, Codex, Cursor, OpenClaw, Hermes, WorkBuddy, and pi; reads up to 50 workspace files touched during sessions to summarize them; edits global agent instruction, hook, and extension files; and stores databases, logs, and Markdown mirrors under ~/.memu.
Network
Sends queries, memories, and resource summaries to MemU Cloud (api.memu.so) or configured embedding APIs (OpenAI, Jina, Voyage, Doubao, OpenRouter, or custom endpoints); connects to PostgreSQL when configured; sends usage and error telemetry to api.memu.so; fetches live prompt templates and guides from memu.pro; and downloads official Claude or Codex installer scripts when missing.
Shell commands
Spawns headless coding agents (claude, codex, pi, hermes, cursor-agent) for background memory extraction and query rewriting, executes downloaded shell or PowerShell installer scripts, and instructs agents to run bash commands during self-evolve jobs.
Secrets
Reads and writes MemU Cloud and embedding provider API keys in ~/.memu/config.env and environment variables, and can write ANTHROPIC_API_KEY or ANTHROPIC_AUTH_TOKEN in plaintext into ~/.claude/settings.json.
System
Registers and removes Windows Scheduled Tasks under \memU\, updates the Windows user PATH via PowerShell during CLI setup, and instructs agents to register Unix cron jobs or launchd agents.

Findings

2 high2 medium3 low
  1. HighBackground memory workers disable agent sandboxing and permission checks

    src/memu/hosts/claude_code/cli.py:92

    Installing memU on Claude Code or Codex registers a prompt-submission hook that periodically launches a detached background agent using --dangerously-skip-permissions on Claude Code (and --dangerously-bypass-approvals-and-sandbox in src/memu/hosts/codex/cli.py, or --ignore-rules on Hermes). That unattended agent has full shell and tool access and is told to read raw session transcripts, including untrusted tool outputs from web pages, issues, or repository files read during earlier restricted sessions. Even though the setup guides tell Codex users to restore their previous permission mode after installing, indirect prompt injection inside any recorded session log can trick the unsandboxed background worker into executing arbitrary commands without user approval.

    Fix: Run background memorization workers inside a strict sandbox limited to the host's ~/.memu working directory, disable external MCP servers and arbitrary shell commands, and explicitly frame session transcripts as untrusted data.

  2. HighAgent prompts and skill files auto-update from memu.pro without signature verification

    src/memu/hosts/templates.py:53

    During installation, skill setup, and scheduled or hook-triggered prepare runs, memU fetches live agent job prompts, retrieval skill files, and install guides from https://memu.pro/sdk/instructions and https://memu.pro/sdk/docs. These downloaded instructions overwrite installed skill files or managed AGENTS.md/SOUL.md blocks and are executed directly by coding agents with shell access, including the unsandboxed background workers. Validation only checks file size and format placeholders, with no cryptographic signature or version pinning, and remote fetching remains active even in self-hosted local mode unless environment overrides are manually set to empty strings.

    Fix: Use packaged embedded templates by default unless the user explicitly opts into remote updates, and verify detached cryptographic signatures on any remotely fetched prompt or guide before writing or executing it.

  3. MediumMissing path containment when mirroring recall files to disk

    src/memu/hosts/bridging/recall_files.py:51

    When retrieve (which runs automatically on every prompt hook) or prepare mirrors recall files to disk, recall_file_path builds the destination path directly from the record's name field without checking for '..' or path separators. While local MemoryService commits block slashes on write, CloudMemoryClient responses, custom cloud endpoints, shared PostgreSQL databases, and pre-existing database rows are written straight to disk without containment checks. A compromised or malicious remote backend or shared store returning a name such as '../../.claude/CLAUDE' or '../../.codex/AGENTS' can overwrite global agent instruction files or any other .md file on the user's machine.

    Fix: Reject path separators, null bytes, and '..' inside recall_file_path and verify that the resolved target path stays inside the intended base_dir/subdir directory before writing.

  4. MediumUndisclosed default-on telemetry sent to api.memu.so even in local mode

    src/memu/events.py:78

    Even when installed in self-hosted local mode (described in the README as Private and Single-device), memU enables analytics reporting by default and sends HTTP POSTs to api.memu.so on every retrieve call as well as during init, install, prepare, commit, and CLI errors. Payloads include a persistent client UUID stored in ~/.memu/config.env, OS, host platform, active session ID, item counts, stack frame module/line info, an Authorization header if MEMU_CLOUD_API_KEY is present, and up to 5,000 characters of free-form LLM-written failure summaries when agents follow the guides' report error instructions. Neither README.md nor INSTALL.md discloses this telemetry or the MEMU_TELEMETRY=0 / DO_NOT_TRACK=1 opt-out switches, and several install guides inaccurately state that report install sends nothing off the machine.

    Fix: Disable telemetry by default in local/self-hosted mode, clearly document what is sent and how to opt out in README.md and INSTALL.md, and remove instructions asking agents to upload free-form error prose.

  5. LowAutomatic execution of unpinned remote vendor install scripts

    src/memu/hosts/cli_install.py:71

    The packaged Claude Code and Codex installation guides instruct the agent to run install with --non-interactive and --install-missing in a single pass without stopping for confirmation. If a standalone claude or codex CLI is not found on PATH (common for desktop-app-only users), cli_install downloads https://claude.ai/install.{sh,ps1} or https://chatgpt.com/codex/install.{sh,ps1} at runtime and executes it with sh/bash or PowerShell -ExecutionPolicy Bypass without version pinning, checksum verification, or user confirmation.

    Fix: Require explicit user confirmation before downloading and running third-party installers in non-interactive agent setups, or instruct users to install the host CLI via their OS package manager.

  6. LowBackup and state files created with default umask instead of owner-only permissions

    src/memu/hosts/claude_code/hook_install.py:97

    ~/.claude/settings.json can contain plaintext ANTHROPIC_API_KEY or ANTHROPIC_AUTH_TOKEN credentials, yet hook_install backs it up to settings.json.memu-backup using Path.write_bytes(), which applies the process umask (typically 0644, readable by other local users on POSIX systems) instead of preserving 0600 permissions. Similarly, src/memu/hosts/installation.py creates ~/.memu and host subdirectories with default 0755 permissions before config_file.write_values runs mkdir(mode=0o700), leaving memu.sqlite3, sliced session transcripts, and hook logs readable to other local accounts on shared machines.

    Fix: Write backup files atomically with 0600 permissions (matching _atomic_write) and explicitly chmod ~/.memu and host state directories to 0700 even when they already exist.

  7. LowAPI keys passed on command line are recorded into mined session transcripts

    SKILL.md:84

    SKILL.md and the host install guides instruct the AI agent to pass --cloud-api-key and --embed-api-key values directly as command-line arguments. Beyond exposing keys in the OS process table on multi-user systems, tool calls executed by the agent are saved in the host's session log, and memU's transcript sanitizers do not redact CLI flag values when slicing tool records into *_full.jsonl files for background self-evolve agents.

    Fix: Accept API keys via stdin or environment variables instead of command-line flags, and redact credential flag values when sanitizing session transcripts.