Skip to content
Heist/ feed
Back to feed
Medium

MCP Memory Keeper: Arbitrary local file read in mcp-memory-keeper context_import via unvalidated filePath

Type: advisorySources: OSV

MCP Memory Keeper is an MCP server for persistent context management in AI coding assistants. Prior to 0.13.0, context_import in src/index.ts passes the caller-controlled filePath directly to fs.readFileSync without restricting the path to an export directory. An MCP client, including an LLM agent induced to call the tool, can use ../ traversal or an absolute path to target any file readable by the server process. A valid JSON file is parsed and imported into the caller's session, allowing its full contents to be retrieved through context_get or context_export, while JSON.parse errors for non-JSON files can return leading file bytes in a SyntaxError message. The two disclosure modes can expose other exported sessions, JSON credentials or service-account files, environment files, and portions of SSH keys or other local files. This issue is fixed in version 0.13.0.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-54561
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 18:02 UTC · Revision 1

Source evidence

MCP Memory Keeper: Arbitrary local file read in mcp-memory-keeper context_import via unvalidated filePath

core-osv · Original source

Published 15 Sept 2026, 16:32 UTC

MCP Memory Keeper is an MCP server for persistent context management in AI coding assistants. Prior to 0.13.0, context_import in src/index.ts passes the caller-controlled filePath directly to fs.readFileSync without restricting the path to an export directory. An MCP client, including an LLM agent induced to call the tool, can use ../ traversal or an absolute path to target any file readable by the server process. A valid JSON file is parsed and imported into the caller's session, allowing its full contents to be retrieved through context_get or context_export, while JSON.parse errors for non-JSON files can return leading file bytes in a SyntaxError message. The two disclosure modes can expose other exported sessions, JSON credentials or service-account files, environment files, and portions of SSH keys or other local files. This issue is fixed in version 0.13.0.

osv:CVE-2026-54561
Complete source record
{
  "id": "d66976b235500ee8cba4de8a1c7bcd73ff35dbab532efcf0297dc0d23d3abee1",
  "url": "https://osv.dev/vulnerability/CVE-2026-54561",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "MCP Memory Keeper: Arbitrary local file read in mcp-memory-keeper context_import via unvalidated filePath",
    "summary": "MCP Memory Keeper is an MCP server for persistent context management in AI coding assistants. Prior to 0.13.0, context_import in src/index.ts passes the caller-controlled filePath directly to fs.readFileSync without restricting the path to an export directory. An MCP client, including an LLM agent induced to call the tool, can use ../ traversal or an absolute path to target any file readable by the server process. A valid JSON file is parsed and imported into the caller's session, allowing its full contents to be retrieved through context_get or context_export, while JSON.parse errors for non-JSON files can return leading file bytes in a SyntaxError message. The two disclosure modes can expose other exported sessions, JSON credentials or service-account files, environment files, and portions of SSH keys or other local files. This issue is fixed in version 0.13.0.",
    "evidence": "osv:CVE-2026-54561",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2026-54561",
      "aliases": [
        "CVE-2026-54561",
        "GHSA-f7wf-v2vw-mpcx"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/mkreyman/mcp-memory-keeper",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "84f6dfa692736a34ff36e2d2cf2188b71facf73b"
                },
                {
                  "fixed": "58640c22e037572e0b03bc0aa25d015ea98dcc6d"
                },
                {
                  "fixed": "b9369568468007c85f8aec3ae09ca6f611285bc5"
                },
                {
                  "fixed": "e0ab521a9e8343bcab1ca60ccc3601e4d86eaa97"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "0.13.0"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "range": [
                      {
                        "fixed": "58640c22e037572e0b03bc0aa25d015ea98dcc6d"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "b9369568468007c85f8aec3ae09ca6f611285bc5"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "e0ab521a9e8343bcab1ca60ccc3601e4d86eaa97"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "84f6dfa692736a34ff36e2d2cf2188b71facf73b"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "v0.13.0"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v0.12.2",
            "v0.12.1",
            "v0.12.0",
            "v0.11.0",
            "v0.10.2",
            "v0.8.5"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-54561.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:31.194088548Z",
      "provider": "osv",
      "references": [
        "https://github.com/mkreyman/mcp-memory-keeper/releases/tag/v0.13.0",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/54xxx/CVE-2026-54561.json",
        "https://github.com/mkreyman/mcp-memory-keeper/security/advisories/GHSA-f7wf-v2vw-mpcx",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-54561",
        "https://github.com/mkreyman/mcp-memory-keeper/issues/35",
        "https://github.com/mkreyman/mcp-memory-keeper/commit/58640c22e037572e0b03bc0aa25d015ea98dcc6d",
        "https://github.com/mkreyman/mcp-memory-keeper/commit/b9369568468007c85f8aec3ae09ca6f611285bc5",
        "https://github.com/mkreyman/mcp-memory-keeper/commit/e0ab521a9e8343bcab1ca60ccc3601e4d86eaa97",
        "https://github.com/mkreyman/mcp-memory-keeper/pull/36"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-209",
          "CWE-22"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/54xxx/CVE-2026-54561.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-54561",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 498121,
  "published_at": "2026-09-15T16:32:01.307+00:00"
}