CVE-2026-54561: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in mkreyman mcp-memory-keeper
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.
AI Analysis
Technical Summary
The vulnerability in mcp-memory-keeper (before 0.13.0) involves improper limitation of pathname to a restricted directory (CWE-22). The context_import function in src/index.ts uses fs.readFileSync on a caller-controlled filePath without path restriction, enabling directory traversal via '../' or absolute paths. This allows reading arbitrary files readable by the server process. Valid JSON files are parsed and imported into the caller's session, exposing their full contents through context_get or context_export. For non-JSON files, JSON.parse errors may leak leading file bytes in error messages (CWE-209). This can disclose sensitive data such as exported sessions, credentials, environment variables, and SSH key fragments. The vulnerability is fixed in version 0.13.0.
Potential Impact
An attacker or a malicious LLM agent can exploit this vulnerability to read arbitrary files on the server running mcp-memory-keeper, potentially exposing sensitive information including credentials, service account files, environment variables, and SSH keys. The vulnerability does not allow code execution or denial of service but results in confidentiality loss. The CVSS 3.1 base score is 6.2 (medium severity), reflecting local attack vector with low complexity and no privileges required.
Mitigation Recommendations
Upgrade mcp-memory-keeper to version 0.13.0 or later, where the vulnerability is fixed by restricting file path access in context_import. No other mitigations are indicated by the vendor advisory. Patch status is confirmed fixed in 0.13.0.
CVE-2026-54561: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in mkreyman mcp-memory-keeper
Description
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.
CVSS v3.1
Score 6.2medium
Affected software
mkreyman
mcp-memory-keeper
pkg:github/mkreyman/mcp-memory-keeperRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in mcp-memory-keeper (before 0.13.0) involves improper limitation of pathname to a restricted directory (CWE-22). The context_import function in src/index.ts uses fs.readFileSync on a caller-controlled filePath without path restriction, enabling directory traversal via '../' or absolute paths. This allows reading arbitrary files readable by the server process. Valid JSON files are parsed and imported into the caller's session, exposing their full contents through context_get or context_export. For non-JSON files, JSON.parse errors may leak leading file bytes in error messages (CWE-209). This can disclose sensitive data such as exported sessions, credentials, environment variables, and SSH key fragments. The vulnerability is fixed in version 0.13.0.
Potential Impact
An attacker or a malicious LLM agent can exploit this vulnerability to read arbitrary files on the server running mcp-memory-keeper, potentially exposing sensitive information including credentials, service account files, environment variables, and SSH keys. The vulnerability does not allow code execution or denial of service but results in confidentiality loss. The CVSS 3.1 base score is 6.2 (medium severity), reflecting local attack vector with low complexity and no privileges required.
Mitigation Recommendations
Upgrade mcp-memory-keeper to version 0.13.0 or later, where the vulnerability is fixed by restricting file path access in context_import. No other mitigations are indicated by the vendor advisory. Patch status is confirmed fixed in 0.13.0.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-06-15T19:04:14.457Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6aa9769455bf5e2cf5196303
Added to database: 09/15/2026, 16:47:16 UTC
Last enriched: 09/15/2026, 17:02:02 UTC
Last updated: 09/16/2026, 03:07:31 UTC
Views: 11
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.