Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. mcp-memory-keeper
  4. ›
  5. CVE-2026-54561

CVE-2026-54561: mcp-memory-keeper: Arbitrary local file read in context_import via unvalidated filePath

July 17, 2026

context_import passed the caller-supplied filePath directly to fs.readFileSync with no path confinement. A malicious MCP client — or an LLM agent that is prompt-injected into calling the tool — could point filePath at any file readable by the server process, outside any session or export directory:

  • Full disclosure (JSON files): a valid-JSON target (e.g. another user’s exported session, or a *.json credential / service-account file) is parsed and imported into the caller’s session, then retrievable verbatim via context_get / context_export.
  • Partial disclosure (any file): for a non-JSON target (e.g. /etc/passwd, an SSH key, a .env), JSON.parse throws and V8 includes a snippet of the file’s leading bytes in the SyntaxError message, which was returned verbatim to the caller.

Both ../ traversal and absolute paths worked — there was no path confinement of any kind.

In a typical MCP deployment the server runs on the developer’s machine, so the reachable set includes other users’ exported memory sessions, JSON credential/config files, and (in leading-bytes form) .env files, SSH keys, and /etc/passwd. The trigger is a tool argument, so the realistic threat model is an LLM agent prompt-injected into calling context_import, or any MCP client connected to the server.

References

  • github.com/advisories/GHSA-f7wf-v2vw-mpcx
  • github.com/mkreyman/mcp-memory-keeper/commit/84f6dfa692736a34ff36e2d2cf2188b71facf73b
  • github.com/mkreyman/mcp-memory-keeper/issues/35
  • github.com/mkreyman/mcp-memory-keeper/pull/36
  • github.com/mkreyman/mcp-memory-keeper/releases/tag/v0.13.0
  • github.com/mkreyman/mcp-memory-keeper/security/advisories/GHSA-f7wf-v2vw-mpcx
  • nvd.nist.gov/vuln/detail/CVE-2026-54561

Code Behaviors & Features

Detect and mitigate CVE-2026-54561 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.13.0

Fixed versions

  • 0.13.0

Solution

Upgrade to version 0.13.0 or above.

Impact 6.2 MEDIUM

CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-209: Generation of Error Message Containing Sensitive Information
  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Source file

npm/mcp-memory-keeper/CVE-2026-54561.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 08 Aug 2026 00:17:12 +0000.