Memory saveGraph temp-path race exposes protected files through symlinked chmod
GHSA-48j5-hj63-c82c · published 2026-11-27
- Severity
- Medium
- CVSS score
- Not scored
- Chance of exploitation (EPSS)
- No CVE
- Fixed in
- 2.2.2
The attacker needs a local account with write and search access to the directory containing MEMORY_FILE_PATH, access to the supported local HTTP endpoint, and a successful race against the save operation. No network exposure beyond loopback is required, but the HTTP transport is opt-in; default stdio-only installations and private graph directories are not affected by this scenario. The reproduction demonstrated an unauthorized file-permission change on a file outside the configured graph path. It did not read real secret contents or run the request as UID 1001. The conservative CVSS v3.1 Base vector is , scoring 4.2 (Medium). …
Upgrade @modelcontextprotocol/server-memory to 2.2.2 or later. If you start it from an MCP config with npx or uvx, pin that version so an old cached copy is not used.
Keep operations bound to the temporary inode created by the save. Create it exclusively without following links, retain its file handle, write and change its mode through that handle, and ensure the source pathname still identifies that inode before renaming it. Where an untrusted user can modify the graph directory, use a private directory or equivalent directory-handle protections so that user cannot replace the temporary entry during the save. …
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| @modelcontextprotocol/server-memory | npm | >= 1.0.0, < 2.2.2 | 2.2.2 |
- CriticalMCP Path Traversal Allows Full-Filesystem Read and JWT Secret Exfiltration Leading to Account Takeoverlangflow, langflow-base
- CriticalVibe-Trading FastAPI endpoints permit unauthenticated access, file upload, and an RCE chainvibe-trading-ai
- Critical@zereight/mcp-gitlab: Unauthenticated arbitrary file read via `upload_markdown` enables PAT exfiltration and full account takeover@zereight/mcp-gitlab
- CriticalFlowise RCE via SQL Database Chain Nodeflowise, flowise-components
- CriticalLangroid: SQLChatAgent dangerous-function blocklist can be bypassed with quoted or schema-qualified pg_read_file callslangroid
- Criticalfast-mcp-telegram: Bearer token path traversal bypasses reserved Telegram session protectionfast-mcp-telegram
- Mediummemory: planted symlink at the memory file leaks its target on save@modelcontextprotocol/server-memory
- Lowmemory: refreshLock symlink race touches any file the server user owns@modelcontextprotocol/server-memory
The impact, patch and workaround text comes from the advisory, shortened (published by the MCP reference servers project). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.