Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-19285

CVE-2026-19285: memory-graph Path Traversal Vulnerability

CVE-2026-19285 is a path traversal flaw in aaronsb memory-graph affecting JsonMemoryStorage functions in memoryTools.ts. Attackers can exploit this locally to access unauthorized files. This article covers technical details, impact, and mitigation strategies.

Published:

CVE-2026-19285 Overview

CVE-2026-19285 is a path traversal vulnerability [CWE-22] in the aaronsb/memory-graph project, affecting commits up to 5cfd2382778837b9f6399080956eee670d00452c. The flaw resides in the JsonMemoryStorage.createDomain, JsonMemoryStorage.getMemories, and JsonMemoryStorage.saveMemories functions within src/tools/memoryTools.ts. An attacker with local access and low privileges can manipulate input to traverse directory boundaries and access or write files outside the intended storage directory. The project uses a rolling release model, so no fixed version is available. According to the disclosure, the maintainer was notified through an issue report but has not responded.

Critical Impact

Local attackers can read or overwrite files outside the intended memory-graph storage directory by supplying crafted domain or memory identifiers to the affected JsonMemoryStorage functions.

Affected Products

  • aaronsb/memory-graph up to commit 5cfd2382778837b9f6399080956eee670d00452c
  • Affected source file: src/tools/memoryTools.ts
  • Affected functions: JsonMemoryStorage.createDomain, JsonMemoryStorage.getMemories, JsonMemoryStorage.saveMemories

Discovery Timeline

  • 2026-08-08 - CVE-2026-19285 published to NVD
  • 2026-08-12 - Last updated in NVD database

Technical Details for CVE-2026-19285

Vulnerability Analysis

The vulnerability is a path traversal issue in JsonMemoryStorage, the JSON-backed storage layer of the memory-graph tool. The three affected functions accept identifiers, such as a domain name or memory key, and concatenate them into file system paths without normalization or validation. An attacker supplying a value containing .. sequences or absolute path components can escape the intended storage directory. This allows reading arbitrary JSON-parseable content through getMemories and writing attacker-controlled JSON through createDomain and saveMemories. Because the project publishes on a rolling release basis, there is no numbered fixed version, and the maintainer has not acknowledged the issue at time of disclosure.

Root Cause

The root cause is missing input sanitization on identifiers used to construct file paths inside src/tools/memoryTools.ts. The functions build target paths using untrusted string input and do not enforce that the resulting path stays within the storage root directory.

Attack Vector

Exploitation requires local access to invoke the memory-graph tool with authenticated privileges. A local user who can supply domain or memory identifiers, either directly or through an integration that forwards user-supplied values, can trigger the traversal. Network-based exploitation is not applicable given the local attack vector. The vulnerability is described in the VulDB CVE Details and the GitHub Issue Discussion.

Detection Methods for CVE-2026-19285

Indicators of Compromise

  • Unexpected JSON files appearing outside the configured memory-graph storage directory, particularly in parent directories or user home paths.
  • Domain or memory identifiers in application logs containing ../, ..\, or absolute path prefixes such as /etc/ or C:\.
  • Modification timestamps on system or configuration files that correlate with memory-graph process activity.

Detection Strategies

  • Audit invocations of JsonMemoryStorage.createDomain, JsonMemoryStorage.getMemories, and JsonMemoryStorage.saveMemories for identifier values containing traversal sequences.
  • Compare file writes made by the memory-graph process against an allowlist of the configured storage root directory.
  • Enable file system auditing on directories adjacent to the memory-graph storage path to catch escape attempts.

Monitoring Recommendations

  • Monitor process file access patterns for the Node.js runtime hosting memory-graph to detect writes outside the expected working directory.
  • Alert on any newly created or modified JSON files owned by the memory-graph service account outside its designated storage tree.
  • Collect and review issue tracker activity on the GitHub Project Repository for maintainer response and any published fix commit.

How to Mitigate CVE-2026-19285

Immediate Actions Required

  • Restrict who can invoke the memory-graph tool to trusted local users only, since the attack requires low local privileges.
  • Run memory-graph under a dedicated, unprivileged service account with file system access limited to the storage directory.
  • Sanitize any identifier passed to createDomain, getMemories, or saveMemories upstream of the vulnerable functions to reject .., path separators, and absolute paths.

Patch Information

No vendor patch is available at the time of publication. The maintainer was notified through the GitHub Issue Discussion but has not responded. Because aaronsb/memory-graph uses a rolling release model, users should monitor the GitHub Project Repository for a remediation commit and pin to a specific reviewed commit hash until a fix is merged.

Workarounds

  • Apply a local fork that normalizes each identifier with path.resolve and verifies the resulting path is contained within the storage root before any file operation.
  • Use operating system controls such as chroot, containers, or mandatory access control profiles to constrain the memory-graph process to its storage directory.
  • Deploy file integrity monitoring on directories outside the memory-graph storage root to detect successful traversal writes.

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.