# GHSA-VQPP-QH58-2P7H: memory\_export writes to an arbitrary path and memory\_import reads one

- Database: GitHub
- Severity: high (stated by ghsa, no CVSS score)
- Published: 2026-11-05
- Modified: 2026-11-05

## Affected versions

- @claude-flow/cli (npm): through 3.71.3
- claude-flow (npm): through 3.71.3
- ruflo (npm): through 3.71.3

## Description

### Impact
**Write.** `memory_export` (`v3/@claude-flow/cli/src/mcp-tools/memory-tools.ts`, around lines 1726 and 1802) calls `writeFileSync(outputPath, …)` with no `validatePath` and no workspace containment. An MCP caller can overwrite any file the user can write. If the caller first stores a value containing shell syntax and exports into a file the shell reads at startup (`~/.bashrc`), the JSON line runs as a command on the user's next shell. `~/.ssh/authorized_keys` and other config files can also be overwritten.

**Read.** `memory_import` (around lines 1844-1846) reads any `inputPath` and echoes the JSON parse error, which includes the first bytes of a non-JSON file such as `/etc/passwd`.

**Database path.** `dbPath` (`resolveDbPathOption`) is resolved without containment in every memory tool.

This is the same class as the `session_export` path traversal fixed in #4671 (d369bb73b); this sibling was missed.

### Fix
Apply the realpath containment helper from the `session_export` fix to `outputPath`, `inputPath` and `dbPath`, refuse symlinks, and return a generic parse error.

## References

- https://github.com/ruvnet/ruflo/security/advisories/GHSA-vqpp-qh58-2p7h

Page: https://cve.now/GHSA-VQPP-QH58-2P7H

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
