Vulnerabilities in pkg:npm/mcp-memory-keeper
PACKAGECVE-2026-54561 is a MODERATE (CVSS 6.2) arbitrary local file read vulnerability (CWE-209: Generation of Error Message Containing Sensitive Information) affecting mcp-memory-keeper libraries in the npm ecosystem. The issue involves arbitrary local file read in context_import via unvalidated filepath. Remediation is available by upgrading affected packages to version 0.13.0.
pkg:npm/mcp-memory-keeper
Vulnerability advisories affecting package pkg:npm/mcp-memory-keeper. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-f7wf-v2vw-mpcx | CVE-2026-54561 | MODERATE | mcp-memory-keeper: Arbitrary local file read in context_import via unvalidated filePath |
CVE-2026-54561 at a Glance
Security Impact
CVSS: 6.2
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).
How to Fix CVE-2026-54561
To remediate this vulnerability, upgrade all affected mcp-memory-keeper dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install mcp-memory-keeper@0.13.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls mcp-memory-keeper
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-54561, inspect your project dependencies using npm:
npm ls mcp-memory-keeper
Analyze the terminal output to locate any version of mcp-memory-keeper in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.13.0), your application is affected.
Note: The npm ls mcp-memory-keeper command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-209: Generation of Error Message Containing Sensitive Information, where the product generates an error message that includes sensitive information about its environment, users, or associated data. In mcp-memory-keeper, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-54561 Affected mcp-memory-keeper Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
mcp-memory-keeper
|
npm |
< 0.13.0
|
0.13.0
|
References
Frequently Asked Questions
What is CVE-2026-54561?
Which mcp-memory-keeper versions are affected?
What version fixes CVE-2026-54561?
Is mcp-memory-keeper affected?
What is the CVSS score of CVE-2026-54561?
What CWE is associated with CVE-2026-54561?
How can I check npm dependencies for CVE-2026-54561?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-f7wf-v2vw-mpcx",
"modified" : "2026-07-17T19:23:07Z",
"published" : "2026-07-17T19:23:07Z",
"aliases" : [ "CVE-2026-54561" ],
"summary" : "mcp-memory-keeper: Arbitrary local file read in context_import via unvalidated filePath",
"details" : "### Impact\n\n`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:\n\n- **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`.\n- **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.\n\nBoth `../` traversal and absolute paths worked — there was no path confinement of any kind.\n\nIn 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.\n\n### Patches\n\nFixed in **0.13.0** (PR #36):\n\n- Imports are confined to a server-owned exports directory (`<DATA_DIR>/exports`, overridable via `MEMORY_KEEPER_EXPORT_DIR`), resolved with `realpathSync`. `../` traversal, absolute paths outside the directory, and symlink escapes are all rejected.\n- File read and `JSON.parse` are separate operations; read/parse failures return a generic message and never echo file bytes (the `SyntaxError`-message leak is gone). The database-write path is likewise generic.\n- An E2E security regression suite covers the reported arbitrary-read and traversal vectors, plus symlink escape, the directory-prefix boundary, and a no-existence-oracle check.\n\n### Workarounds\n\nUpgrade to **`>= 0.13.0`**. There is no configuration-only workaround for affected versions.\n\n### Resources\n\n- Report: GitHub issue #35\n- Fix: PR #36\n\n### Credit\n\nReported by Zhihao Zhang ([@mcfly-zzh](https://github.com/mcfly-zzh)).",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "mcp-memory-keeper"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.13.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/mkreyman/mcp-memory-keeper/security/advisories/GHSA-f7wf-v2vw-mpcx"
}, {
"type" : "WEB",
"url" : "https://github.com/mkreyman/mcp-memory-keeper/issues/35"
}, {
"type" : "WEB",
"url" : "https://github.com/mkreyman/mcp-memory-keeper/pull/36"
}, {
"type" : "WEB",
"url" : "https://github.com/mkreyman/mcp-memory-keeper/commit/84f6dfa692736a34ff36e2d2cf2188b71facf73b"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/mkreyman/mcp-memory-keeper"
}, {
"type" : "WEB",
"url" : "https://github.com/mkreyman/mcp-memory-keeper/releases/tag/v0.13.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-209", "CWE-22" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-17T19:23:07Z",
"nvd_published_at" : null
}
}